Glue may work but the vast majority of the time it won't with mushrooms. Even if they have some sand attached to the base, they have a way of "sliming" out of the glue. No matter how dry it is when you glue it, they will somehow worm their way out of the glue. I always try with my rics because it is easier but 9 times out of 10, it doesn't work.
Best way is get a small container, cover the bottom with some small rocks or rubble and put the rics in. Cover it with some mesh from any hobby store(i use the mesh packaging on alot of kids toys), put it back in the tank and wait. After7-10 days, you should have an attached ric