Am I understanding correctly that you aren't using an actual shampoo, but a plant extract you made yourself?
Those will quickly grow bacteria and mold without a very strong preservative. Even with a preservative, the high amount of plant matter usually makes preservation quite difficult. I'd make very small batches, and keep them refrigerated if possible. With that in mind, you can try thickening it small amounts of rhassoul clay or xanthan gum.