How to connect steel posts to build a shelf unit?
A lot of structural steel and piping comes galvanized already.  For instance most silver/gray colored iron pipe.  (not black pipe used for gas; apparently methane or its additives don't play well with zinc.)   And you can get galvanized pipe fittings to link them, in most shapes.  

Piping may not be the way to go.  You may want to go with sectional steel channel, one being the Unistrut style and its many clones.  Again, available galvanized. 

If you really wanted to go PVC or EMT conduit, despite the weight load, consider designing a truss.  Crazy large geodesic domes are made using EMT conduit as the structural members. 

There are many ways to arrest corrosion other than galvanizing.  My preferred way is to knock off the rust with a wirebrush or sander, then Rustoleum 7769 Rusty Metal Primer which seems to control light surface rust reasonably well, then any of a variety of topcoats (primer alone will not hold; look any any automobile that's driving around with rust busting through the primer).