A US woman has been sentenced up to seven years in prison after firing her gun at a McDonald's drive-through when her hamburger was delivered twice without bacon.

Shaneka Monique Torres, 30, of Michigan was convicted in March of carrying a concealed weapon, discharging a firearm into a building and felony use of a firearm, according to local media reports.

Torres visited the restaurant's drive-through with a friend on February 10 last year and ordered bacon cheeseburgers.

When the meal arrived with no bacon, a manager apologised and offered her a free meal, local television station WZZM reported.

She returned several hours later and again received her hamburger without the bacon, at which point she screamed at the restaurant worker and pulled a handgun from her purse, firing a round at the building.

There were no injuries reported, but the shots shattered the driver side window of her car.

She was arrested 1.6 kilometres from the restaurant about 30 minutes later.

Her defence lawyer said the shooting was an accident, and was not about receiving her hamburger without bacon, according to WZZM.

A judge ordered Torres serve at least of three years behind bars before being considered for parole.

AFP