To be honest, although they have plot lines in each game, (out of SA1, SA2, and Heroes) I wouldnt really say you needed to play them in any order, although we do get introduced to Shadow in the second, which is why he is in heroes too, thats the only link between them i'd say, the story in 1 in no way links to 2.
Out of the lot though, i'd definately advise getting soinc 2 because it is a kick ::Dolphin Noise:: game, i love sonic and shadows levels in that game, they truly are amazing when you get good at it and run really fast through them!!