This is a passive construction where "shout" is actually the infinitive.
"Shouted" is indeed the past simple and the past participle of the verb "to shout".
The correct sentence is indeed: When Mary was waiting for her friend, she saw a man shout in the street.
Other similar sentences include: I heard him SING; I watched him SLEEP; I listened to him TALK. Notice how these are verbs of perception.
I hope that helps.