Although shampooing a shag rug at home may be a little more involved than washing a regular rug, it is not terribly complicated. You can use regular household items to get the job done. However, if you have a silk or wool-based shag rug, you will need to have it dry cleaned, as it cannot be safely shampooed.
Vacuum the rug with a vacuum cleaner using the upholstery attachments. Most medium- and heavy-piled shag rugs will clog regular vacuums , so it is important to use an upholstery attachment to protect the life of your vacuum.
Spray the rug down with water and then sprinkle an even amount of powdered oxidised bleach on the rug. Use a clean towel to scrub it. You should not see any lathering, but the powder should "disappear" as you scrub.
Use a steam cleaner to remove the powdered bleach solution. Each steam cleaner is different, so check the operations manual for more information if you have never used one before. Take care to run the steam cleaner over the rug completely, so that all the edges and corners will be cleaned. Also make sure to change the water in the steam cleaner (again, see owner's manual for specifics) frequently if you see it coming through the hose/water tank dingy or dirty.
Fold the rug over a laundry rack in a warm, moisture-free environment. Outside is best, but if that is not possible, a bathroom with a dehumidifier also works well. Do not place the rug back on your floor until it is completely dry to the touch.
If you do not own a steam cleaner, check your local grocery store, as many have steam cleaning units for rent.