Take a look at the diet sticky at the top here (A (Hopefully) Comprehensive Guide to Rat Diet). It'll tell you anything you need to know.
I feed my girls Harlan Tekland blocks, which you can buy from several rescues for about $1.25 a pound, plus shipping and handling. I spent about $19 on rat food oh.. about 4 months ago, for about 10 pounds of food, and I'm a little less than halfway through it. So it's far from expensive. Kim's Ark Rescue or Mainely Rat Rescue are just two excellent rat rescues that I've ordered things from.
Also look into Suebees for some additional nutrients. If you wanted to do an abbreviated suebees, as long as you had the HT blocks, you could do mostly just Total Cereal and some kind of puffed cereal (I use Kashi whole Grain Puffs), which would come to no more than $10 for a couple months supply of food.
And don't forget veggies from your own salads! They're just fine eating the ends of carrots or the tougher parts of lettuce that us humans don't want (just no iceberg lettuce)