From the Super Mario Wiki
The Carbo Cookie is an item that appeared in Super Mario RPG: Legend of the Seven Stars. It can be bought from a mole-girl in shop at Moleville. To get it, Mario must buy Fireworks for five hundred coins, then exchange it for a Shiny Stone, and then go to shop and talk to little mole-girl. It cannot be used in battle though. Mario can give it to mole-girl outside the shop two times to get a Frog Coin.