In Shadow the Hedgehog for PS2, GameCube and Xbox, the game splits into Hero and Dark paths. Choose the Dark route and your objective becomes defeating Sonic and claiming all the Emeralds.
That said, Shadow never actually opens fire on Sonic. The confrontation happens, but it is not a shooting match — the rivalry plays out through combat and stolen objectives instead.