No, they aren't enemies. In the Sonic series, they generally work alongside Sonic. Silver eventually realizes that Sonic isn't the Iblis Trigger and becomes his ally, while Shadow sets aside his rivalry and teams up with Sonic rather than fighting him.