Far better to make a whole shelving unit that stands on the floor.
If you want shelves instead one way I've done it and it was super strong is make a 2 X 4 frame, attach whatever you want to the top of it, plywood, OSB, Advantec MDF.
Mount it to the wall using long Tap Cons or lags and lead anchors.
Add some 2 X 4 supports under it cut at 45 deg.
I built the whole thing with ceramic coated decking screws.
If you want shelves instead one way I've done it and it was super strong is make a 2 X 4 frame, attach whatever you want to the top of it, plywood, OSB, Advantec MDF.
Mount it to the wall using long Tap Cons or lags and lead anchors.
Add some 2 X 4 supports under it cut at 45 deg.
I built the whole thing with ceramic coated decking screws.