Hungry Jack's has been fined $75,000 for selling unsuitable food after a woman nearly choked on a metal shaving inside an onion ring.
The fast food chain sold the unsuitable food at its Beechboro store in February this year.
The Perth Magistrates Court was told that the shaving was likely to have come from maintenance work that had been carried out at the store the day before.
Hungry Jack's denied the allegation but today was found guilty.
Magistrate Elaine Campione said she was not satisfied the store's cleaning regime was as thorough as it needed to be.
A lawyer for Hungry Jack's said the matter had been the subject of much soul searching in the company and there had been a review of procedures to ensure the incident did not happen again.
The woman who ate the onion ring, Melissa Bayle, has welcomed the fine handed down to the company.
"I'm happy, as long as there's a lesson to be learnt that cleaner facilities need to be done and maintained when preparing for food," she said.
Ms Bayle says she is glad she took the matter to court.
"If something goes in-house, they like to keep it to themselves, whereas this, this is people's safety, kids' safety of eating unsuitable food." Hungry Jack's says it is disappointed and surprised by the decision and will appeal against it.