SPF is not necessarily bad lumber, and it's often cheap ... However, if it's structural, use Douglas or hemlock fir. If you want to build some unique and functional shelving, plain pine board ...