I distrust the force entrusted to the cantilevered horizontal pieces. I would run two pairs of vertical pipes - one against the wall with T-fittings. One side of the T attaches to the stud, the other side supports the shelf.
Want clear cabinets, but don't want to expose all of your belongings and possible clutter? Think of a frosted effect window film on the doors to leave a little to the imagination. Learn more about window film options at https://www.suntrol.com/homeowners