The man suffered a chipped bone to his elbow as his wallet and mobile phone were stolen during the incident in Beeston.
Leeds Crown Court heard the 63-year-old was making his way home from The Broadway, Dewsbury Road, when he was targeted by a man on a bike.
Ian Cook, prosecuting, said the robber used his mobile phone to take a photo of the victim as he rode past him.
Leeds Festival road closures: Aberford village will be closed to festival traffic after being used as a 'rat run'
Man dead after a paragliding accident near to Leeds
'Highly organised' Leeds thieves caught by own technology after tracking movement of business owners
Leeds United supporters issued warning not to walk on M621 after minibus drops fans off on motorway slip road
Leeds drug farmer locked up after being handed 'lenient' sentence
He then had a conversation in the street with Joanne Towning before again cycling up to the victim and attacking him from behind.
The man was pushed to the ground and had liquid squirted in his face, causing his eyes to sting.
The victim then heard a voice saying: "Get his wallet and mobile phone."
Both items were taken before the attacker cycled away.
Mr Cook said the syringe contained an "unknown organic material" which is believed to have been used during the robbery.
The wallet contained a £20 note and a bank card.
Towning, 42, used the bank card to buy items from a nearby petrol station.
She was identified from CCTV footage and was arrested.
The mobile phone was recovered during a search of her home.
The victim needed hospital treatment to have the liquid washed out of his eyes.
He also suffered a chipped bone to his arm which caused him to have to take time off work.
Towning, of Shakespeare Close, Burmantofts, pleaded guilty to robbery and fraud.
The other robber has not been identified.
Mr Mahoney said Towning's partner had forced her to go out and get him money to buy drugs.
The barrister said his client committed the offences out of desperation and gave the phone to her partner so he could sell it.
He added that Towning was not the main perpetrator of the robbery.
Mr Mahoney said Towning managed to get out of the violent relationship when her partner was sent to prison.
The court heard she has a new partner and had not been trouble in 14 months since the incident.
Towning was given a two-year prison sentence, suspended for two years.
She was ordered to complete 40 rehabilitation activity requirement days.
Towning was also made the subject of an electronically-monitored curfew order for six months.