I'm worried this is almost too simple to be an answer, but I'll add more detail if you have specific questions.
For a ketogenic diet I assume you would need to reduce the daily grams of carbohydrate to the low double digits, or <10% of total calories. Pasta and rice are obviously low-cost calorie sources and you want something that provides a similar amount of calories, without the carbohydrates and without spending more money. While cabbage is usually one of the cheapest vegetable options and is not heavy in carbs, I would watch the premade coleslaw as it usually has a lot of sugar added along with the cabbage and oil.
You can swap out the pasta and rice for things like canned fish, fatty meat, eggs, cheese, cream, butter, coconut milk. Because of the high caloric density of fat and the current trend against high-fat foods, I think you will find these things will meet your caloric needs pretty cost-effectively.
Nutritional balance is a different matter, but you can't go much worse than pasta and rice. If you are really into optimizing low cost and planning to meet certain nutrient targets, you could try this excel sheet: http://excelcalculations.blogspot.com/2011/05/diet-problem-linear-programming.html