Floating shelf
A "floating shelf" is one that attaches to a wall without any visible means of support. There are a number of ways of achieving this effect including with bespoke shelf hanging kits, embedded studs and rails, and this method with concealed support battens. Floating shelves offer the advantages of being less visually intrusive, and allowing all of the space under a shelf to be used without any danger of the support brackets obstructing what in stored beneath.
Click for larger image
Technique
This particular technique require a minimum of two perpendicular supporting walls to hold the shelf, and preferably three. Hence it works very well in alcoves and beside chimney stacks.
The shelf is supported by slim battens that are fixed to the wall in the usual way with screws and wall plugs etc. The maximum batten height wants to be no more than 60% of the shelf thickness.
Click for larger image
The shelf then has a groove rebated into all the batten contact surfaces using a router or on a table saw (you will need to use a router to achieved a "stopped" rebate as shown in this illustration. The rebate is set to the same depth as the batten height, and a little wider than the batten thickness (to allow clearance of the screw heads on the shelf). The stopped rebate is preferable since it hides the front edge of the support. However you can use full through rebates if you stick a lipping to the front of the shelf. For particularly heavily loaded shelves the front lipping can be made deeper than the main shelf to add extra sag resistance to the shelf.
Once the battens are fixed the shelf can be simply laid onto the battens and it will slot into position, or if desired it may also be screwed down to the battens.