I agree with OC. Shims of some sort would be a lot easier, but they have to attach securely to both the door and the shelf.
As for a closure device, consider fabricating a rotating knob with a rod extending to each side. Rotating the knob 90 degrees retracts the rods away from the side frame; rotating it back extends them into a latch (maybe a just a protective piece of metal?) on the cabinet face frame.
If I remember correctly, some tool boxes use that latch .
Bob/Linda, 99 Dodge 2500 Cummins,2010 8280 Rockwood Ultra-lite 5er, PullRite Superglide----- I'm retired......but work part time as a pain in the ass!........... USMC.