Open as many as you can by completing Sonic's Green Hill stages and soon you should get this special cookie. Alternatively, if you get the seven Chaos Emeralds of different colors from the boxes before opening Sonic and Tails, you can use them to unlock Sonic at the Miraculous Chaos Emerald menu as a guaranteed cookie.