You don't glue these. You can put them in a tray full of rubble and maybe mesh on top of it so it doesn't get blown away, and wait for it to voluntarily attach to a pebble.
These mushrooms, I personally consider these invasive. They will multiple like crazy, like just about every other mushroom, BUT, these have a NASTY sting and they WILL kill other corals. I have to remove about a dozen a month to keep them at bay. After 12+yrs of ripping them out of tanks, having them sting and kill other corals, I will NEVER add these to any of my tanks purposely ever again!