I would say discovered. As there are some local medicine that have similarity to shamapoo since ancient times. We also use black soil,aleovera and egg yolk etc. As shampoos.
So nobody invented shampoo it just got designed by generations of experiment.