Ah you'll have to sell some/all your spies on the black market to give you money to buy some food with, but remember you'll need some money on hand as well. Hope this clears things up.
In the future, try to work out when you'll need more money and food by selling units on the public market as you'll get more money for them this way.
This all assumes you are playing with the industrial strat.