That's what's meant by a 'floating' shelf - should have been clearer, sorry. If the battens are securely fixed to the wall then there's no need to screw the MDF skin(s) in place - glue it up with a fast-set PVA e.g. Polyten -
here - and ideally clamp the leading edges together and pin it in place where the clamps don't reach, or just pin it all around while the adhesive sets.
If the shelves are going to take a lot of weight e.g. books, then you can use aluminium or rolled steel box-section in place of the leading edge batten (same dimensions, obviously) epoxied to the top & bottom skins and lipped in the usual way; guaranteed not to sag

HTH Pete