Which Sonic game are you asking about? The answer changes a lot depending on the title, so a little more detail would help.
As a rough guide: Shadow made his debut as a playable character in Sonic Adventure 2, returned in Sonic Heroes, and eventually starred in his own spin-off, Shadow the Hedgehog. In many later games he shows up in multiplayer or bonus modes rather than the main story.
Tell me the exact game and platform and you'll get a much more precise answer.