Moisture barriers are flexible, synthetic layers that prevent water from entering your bathroom walls. Unlike drywall, greenboard and fiberboard, moisture barriers don't allow moisture in the air to pass through. This prevents moisture in the air from reaching cooler parts of your home, such as the space inside the walls, where it will condense into a liquid and cause damage. In other areas of the bathroom and other parts of your home that are only exposed to small amounts of moisture, such as the kitchen, glossy paint can serve in place of a moisture barrier.
A shower needs a moisture barrier if its walls are made of porous material or attached directly to your bathroom walls. For example, a flagstone shower features porous walls made from natural stone and mortar. Even a tile shower requires a moisture barrier, because water can enter the walls through small cracks in the grout or caulk between ceramic tiles. On the other hand, prefabricated shower stalls don't require moisture barriers, since they are made from layers of waterproof material and feature no cracks or seams through which moisture can enter the walls.
If your shower requires a moisture barrier, the barrier should be installed once the bathroom walls and plumbing fixtures are in place, but before any of the shower walls or flooring are installed. The liner attaches to the inner side of the drywall with tacks and adhesive, providing a smooth surface for applying tile or other shower wall materials. During liner installation you must also cut holes for the faucet, shower head and floor drain.
Besides installing a moisture barrier if your shower requires it, you should take additional steps to ensure that your bathroom walls are protected. Glossy paint will protect walls elsewhere in the bathroom. Caulk is useful for sealing off shower stalls to prevent water from pooling on the floor or collecting around the shower door seams. Even if you install a shower stall that doesn't require a moisture barrier, you'll need to apply caulk around the stall to prevent water from entering the walls behind it.