If you're going to give them a shampoo best to do it early in the day before it gets hot because soapy things themselves can damage plants especially under hot dry conditions. Some people leave the soap solution on for a while and then rinse it off with plain water before the sun gets high. You could also try the shampoo in the evening when it is cooler and the soap effect will last longer.