Rats and guinea pigs DO eat their own poop. This will sound weird, but they produce two different "types". They will eat poop that has travelled through the digestive system once, to gain all the "beneficial vitamins" possible. Some people call them "vita-poos". On the second go-around, they seem to know which ones to eat and which ones have been "used" already. Very strange, I know. There's a term for it, coprophagia.
As for what to feed it, they have a prepared food at PetSmart or wherever you usually shop for pet food.