The court heard that Burton and his partner had returned home from an outing the evening before, but she left because Burton was drunk and making stupid comments.
Burton later went into the street and fired a .22 calibre firearm. Two shots hitting a nearby house.
He has no clear recollection of doing it.
"You are very lucky that you didn't injure anyone else or yourself," Judge Mackintosh said.
She said there was "quite a spotlight" on what could happen with firearms and how dangerous they could be.
"The community doesn't want people using firearms in an inappropriate fashion," the judge said.
Police found firearms and ammunition hidden in the framing around a bath. Burton said he had them after being shot in the leg himself earlier.
The judge gave Burton credit for an early guilty plea and for efforts he had made to combat his drug and alcohol use through the Mongrel Mob-led Kahukura rehabilitation programme.
She sentenced him to eight months of home detention, with the initial part of it to be served at the mārae-based residential programme.
"You do have reasonable prospects of rehabilitation," Judge Mackintosh told Burton. "You are still young."
Burton was convicted and discharged on charges of consuming methamphetamine, breach of bail and resisting arrest.
Kahukura is a live-in programme aimed at addressing trauma and drug-seeking behaviour, funded by the Ministry of Health with $2.7 million seized by police under the Criminal Proceeds (Recovery) Act.
It is led by the Chaindogs, a cluster of Mongrel Mob chapters with a common affiliation to the gang's Notorious chapter.