I had a similar issue with the cabinet we kept the printer. I ended up installing a heavy duty magnetic cabinet latch that required a pull of 20 lbs or so. Because of the weight of the pantry, you might want to install two.
They were easy to install and hidden.
Quick search on the web I found this one, it has a pull force of 40lbs. "Leisure Products (PM 2001 L 40 lbs) 90 Degree Magnetic Mount Catch"
__________________
|