The mum had been returning from dropping her other children off at school on January 9 when she was horrified to see Stephen Richards standing nearby exposing himself, Solihull Magistrates Court heard.
Malcolm Stoddard, prosecuting, said he had stopped as the victim and child passed but when the mum looked behind her, Richards, of Guernsey Drive, Smith’s Wood, had resumed his activity and was following the pair.
The court heard that the 26-year-old, who lives with his parents, had explained in police interview that he had never had a girlfriend.
Richards had previously admitted intentionally exposing his genitals to cause alarm and distress at Solihull Magistrates Court.
Back before the bench on Tuesday, February 21, he was handed a three year community order, ordered to spend 225 hours in a sex offender group programme and pay £100 compensation and £100 costs.
Richards was also told he must sign the Solihull Police sex offenders’ register.