I fought this enough with regular equipment racks. I thought most of the equipment would bond the rack if bolted to the rack rail through its rack ears. But we used non-marring rack mount screws which are effectively insulated. And many rack ears and rails are painted. I found some rack mounting bolts made by Panduit that have notches under the head to penetrate paint, and thread forming threads to cut any paint in the rack threads. When I measured it with a bonding meter, it wasn't always as good as what I wanted (depended on how many cord and plug items were mounted to the rack, and whether the rack rails were painted insulating them from the frames). I finally got to the point where I installed a ground bar to the rack rails with these panduit screws and put a jumper to the frame. Most of these rack frames had a bonding screw lug, so at least the basic structure got bonded if you ran a bonding conductor to that screw.
If these shelves are just metal shelves and not tested/listed for grounding/bonding, things may be even more challenging because of painted structure. Toothed lock washers can help to bond interconnect pieces of metal bolted together. But it still may not be great.
I'm not sure how much of a hazard cords running across a painted metal shelf are. On equipment racks, there are places where power enter the racks, and power cords that didn't get tided down could get pinched in doors. I remember moving a rack once not knowing it had power coming into it from under the floor, and the rack had no wheels. I saw sparks when I ran over the power cord. It didn't trip a breaker or energize the rack, but made me aware of some of the problems.