Keyhole fasteners allow mounting of cube shelving flush against walls. Attach these fasteners to the back of the cubes, and the hardware is not visible. This is a quick process that should not take more than half an hour per cube.
Attach the fastener
Measure the cube to determine the center. Place the fastener at the horizontal center with the top of the keyhole 1 inch below the top of the cube, and mark the location of the attachment holes. Predrill the screw holes to prevent damage to the back of the cube. Attach the fastener with the appropriate-length screw.
Insert screw into wall
Determine the location for the cube. Mark the location for the screw 1 inch below where you want the top of the cube. Use a stud finder to determine if this location happens to be over a stud behind the wallboard. If there is a stud, predrill a hole and insert a 3-inch wood screw into the stud. Don't drive the screw all the way into the wall, but leave enough room to slide the keyhole fastener over the screw. In other locations, choose an appropriately sized self-drilling molly bolt to support the weight of the shelf and its intended contents. Once you drill the bolt into the wall, press its faceplate against the wallboard, and tighten the screw.
Hang the shelf
Align the screw head and the round opening of the keyhole fastener. Slide the cube down to it into place. Level the cube.