There are different ways that floating shelves work depending on the shelf material. For our wooden floating shelves we drill a hole in the rear of each shelf in multiple positions depending on the length of shelf.
The shelf supports that we provide are firstly fixed to the wall in line with the pre-drilled holes, and once secure the wooden shelf is positioned on to the fixings so that they are hidden inside of the shelf itself.