For its first hundred years in English, shampoo had nothing to do with hair.

The word comes from Hindi champo, the imperative of the verb champna, "to press" or "to knead the muscles." Etymonline suggests the verb may go back to Sanskrit capayati, "pounds, kneads," though that link is only possible. English recorded it in 1762, as a verb meaning to massage and rub the body to restore tone and vigor.

The washing sense came much later. Etymonline dates "wash and lather the hair" to 1860. The noun for the act is recorded in 1838, and the noun for a soap used for shampooing in 1866. Cleaning carpets and upholstery was added in 1954.

Brighton helped make the word fashionable. Sake Dean Mahomed was born in Patna, India, in 1759, though he later gave an earlier year, and moved to Brighton in 1814. According to Aramco World, by about 1820 he ran a bathhouse on the seafront, where clients received a steam bath followed by massage. Wikipedia gives 1821 for the opening. He became "Shampooing Surgeon" to George IV, and Aramco World says William IV kept him in the role after 1830.

It is tempting to say Mahomed introduced the word to England. The dates do not support that, because English had recorded shampoo in 1762, long before he arrived. What he did was turn a word for a massage into a fashionable English service.

The sense then slid sideways. By 1860 the word was being used for washing and lathering the hair, and later for the soap itself. Today it names the bottle in the shower, and it began as an instruction to press.