Take out all the furniture that is resting on the shag carpet.
Vacuum the shag carpet with an upright vacuum cleaner first going in one direction. Re-vacuum the carpet going in the other direction to fluff up the fibers.
Rent or buy a steam cleaner, which is ideal for shag rugs. It will not pull out or tangle the fibers like an electrical shampooer.
Mix together hot water and the foam cleanser and fill the canister with this solution. Follow the directions on your steam cleaner to clean your shag rug. The soapy solution is forced deep into the shag rug fibers and then sucked back up, leaving your shag carpet clean and damp.
Turn all overhead fans on and place box fans throughout the room to help dry the shag rugs as quickly as possible. Open the windows if the air outside is dry and cool. Damp rugs can lead to mold.
Replace all the furniture only when the shag rug is completely dry.