So, this requires you to aquire ALL Of Sonics Abilitys.
Basically, you are introduced to the Shop at the start of the game, as you need to buy the Light Chip, so you don't need to worry about that, and it's not a worry any, it's only 100 rings
Below, I will list all the items and their prices, I will also BOLD The ones that I suggest you buy first, as they will help you get S Ranks on Side Missions.
Light Chip - 100
Antigravity - 500
Bounce Bracelet - 2000
Green Gem - 5000
Red Gem - 5000 (This slows down time, meaning that you can get a better time bonus)
Blue Gem - 7000 (This speeds you up, and when a side-mission is in the hub world, it definetly helps.)
White Gem - 8000
Sky Gem - 10,000 (This is like a grappling hook, you aim and throw, and you will be teleported there, this can be easily abused to get past large sections, like in Aquatic Base)
Yellow Gem - 12000
Purple Gem - 14000 (This allows you to turn small, and keep jumping until the energy bar runs out... except as you may know, the bar never runs out as Sonic, meaning you can jump forever)
Now, how to gain rings!
First off, S Rank as many of the ACT Missions as possible, this will allow you to gain a generous amount of rings
Once this is done, do every town mission and try to S Rank them first try.
If you still don't have enough rings, your best bet is to keep on facing the final boss over and over.
I hope this helps!