When a batten cannot be fitted to support the length of a shelf – where, for instance, it would take up valuable space or look unsightly – support the length invisibly by plugging screws into the back wall.
Start by placing the shelf against the wall and scribing the positions for the screws on both shelf and wall at 225 mm 9 in intervals. Then fit the screws into the wall, leaving about 19mm of their length exposed. Cut off the heads with a hacksaw.
Check the marks on the shelf against the final position of the screws and then drill holes in the shelf to a depth of 25mm 1 in at each marked point. When the shelf is placed in position, the sheared-off screws will fit into the holes, providing an extremely rigid fixing along the shelf’s length. Screw battens, or other supports, to the side wall to take the main weight of the shelf.