Questions & Answers about Minä joudun ostamaan ruokaa kaupasta.
Finnish uses the partitive (ending -a/–ä) for:
1) Indefinite quantity (some food, not a whole meal)
2) Objects of actions expressed by an infinitive or ongoing action.
Since you’re buying some food, ruokaa is correct. If you were buying a specific meal you might say ruoan (accusative/genitive).