Rhys Wills, 26, ran up Dawley High Street in Telford towards his former partner on May 5 and attacked her, leaving her with a cut to her ear and a swollen jaw.
He was given a conditional discharge at Shrewsbury Crown Court on Wednesday after admitting a common assault charge, on the basis that he had already spent time in prison on remand.
Judge Peter Barrie said Wills had been punished enough during his time in custody, adding: "One thing you have learned from all of this is that the courts take a severe view of men who use violence towards women when they are going through a break up.”
Prosecutor Julian Taylor told the court how Wills, of Burton Close, Dawley, had been with his partner for between two to three years before they split in February.
The incident took place at 8.15pm outside a shop on Dawley High Street, where Wills' former partner had been buying items.
Wills ran up the street and assaulted her. She fought back, but he struck her and pushed her to the ground before walking into the shop.
A mutual friend of the pair had tried to stop the attack.
Mr Taylor said the victim did not want a restraining order to be put in place, and didn’t want to give a victim impact statement.
Robert Edwards, defending, said it was an unpleasant incident and his client was remorseful and disgusted with his behaviour.
He said it wasn’t a planned attack, and Wills was in the area on other business.
He added his client had already spent 65 days on remand for more serious allegations, and urged the judge to impose a conditional discharge.
Judge Barrie did that, and added: "If you’re provoked by threats of restricting access, to keep the peace the remedy has to be through the courts, not by using violence.”