Just had a thought. You could use m8 threaded bar into rawlbolts as said and use a grub scrub above or below thyself wherever is best hidden to lock into the threaded bar going into the shelf so it holds firm. Easy to remove later then
I don't have dot and dabbed plasterboard. It's a blockwork, covered with ~10mm bonding and ~3mm plaster skim.
I really would just glue the shelf to the wall after doing the threaded rods bit. Just enough adhesive to stop it coming away, but not so much that it causes a major issue to remove.
You could just use a small wood screw underneath where the threaded bar goes into the shelf. You can get loads of different sizes at screwfix for a couple of quid. Get a size that will be just below the surface when it hits the threaded rod so its not seen. Assuming you use 10mm threaded rod and put it in the middle, 25x3.5 screws would do.
How would that not cause any issue to remove when the glue had bonded round the threads