They can sometimes push them open a little.

I use little blocks screwed into the edge of the shelf to hold them shut but you can use little pieces of dowl or even a section of tube to lock all of them at once.