Shampoo is designed for the scalp, which has a slightly acidic pH, whereas body washes are typically designed for the epidermis, which has a more neutral pH.
Shampoos typically contain ingredients that are designed to cleanse the scalp and eliminate superfluous oil and buildup. These ingredients may be too harsh for your skin.
If you have sensitive or dry skin, using shampoo as a body wash can further deplete your skin of its natural oils, causing discomfort and dryness.
While occasional use of shampoo as a body wash in emergency situations is unlikely to cause serious damage, it is preferable to use products that are specially formulated for each purpose.
If you find yourself without body wash, consider using alternatives such as mild soap, infant wash, or even moisturizing oils such as coconut oil or olive oil.