We have these shelves in our house that are great unless the load is unbalanced, at which point they tip off their rail-mounted brackets.
I designed this flat stopper to be placed in the rail on top of the shelf on each side, preventing it from tipping too far.
This can be printed without supports fairly simply.
This model was designed in FreeCAD. I've included the FreeCAD file for simple remixing if necessary.
The author hasn't provided the model origin yet.