How can I help pantry cabinets stay cool?
There is no magic; you are fighting thermodynamics.

You may be able to cool individual containers somewhat by wrapping damp cloth around them so evaporation takes away some of the heat. You could arrange some sort of drip or pump to keep those moist, and a fan to improve the evaporation and heat removal... And you'd basically have reinvented the "swamp cooler".

Or you could insulate thoroughly and reinvent the icebox (assuming you have a source for ice). Or insulate and run an air conditioner, reinventing the refrigerator.