The Mandurah Magistrates Court was told the woman grabbed the boy by his backpack on January 16 and marched him up to the self-service counter at a supermarket.
She shouted at the boy and his mother before leaving the store.
In an interview with police, the woman claimed the boy had been bullying her 15-year-old niece for six months.
The woman’s defence lawyer told the court she had custody of her niece, had been frustrated with the ongoing bullying and wanted it to stop.
Get in front of tomorrow's news for FREE
Journalism for the curious Australian across politics, business, culture and opinion.
READ NOWHe said his client “regrets letting her emotions overcome her judgement”.
Magistrate Leanne Atkins said it was understandable that the woman would want to protect her niece.
She granted the woman a spent conviction and placed her on a six-month conditional release order.