If you have worms coming up out of your shower drain, they are most likely drain fly larvae. Drain flies are also known as sewer flies, or filter flies. These flies feast upon decaying animals, plants and food. If they are coming up out of your shower, you either have a scum buildup on the walls of your pipes or a nasty clog of hair they are feeding upon. To remove the worms, the pipes will have to be cleaned.
Spray a liberal amount of aerosol insecticide for flies in the rooms where you have seen the worms.
Use a flat-head screwdriver to pry off the drain cover where you see the worms.
Fill a bucket with hot water.
Pull out any debris from the drain.
Scrub the sides of the drain with a toilet brush, or other plastic bristled brush.
Replace the drain cover. Spray the room with insecticide again. Wait two days. If the worms reemerge, purchase a drain cleaner and follow its application instructions.