John Kerr, from Paisley, Renfrewshire, was asked by the boy's mother to look after the child on 6 November 2015.
On leaving a pub and returning to the house after a one-hour absence, Kerr found police had been alerted after the tearful child had called 999.
Kerr admitted wilfully abandoning a child in his care in a manner likely to cause unnecessary suffering or injury.
Paisley Sheriff Court heard that the boy dialled 999 after he could not find Kerr.
The seven-year-old was tearful when he told an emergency operator that he only had his pets for company.
Officers went to the property and were able to re-assure the schoolboy before one climbed in through a window and comforted him.
Kerr later returned under the influence of alcohol and claimed he had gone for food for the child.
He later conceded he had visited a bar and had stayed away longer than he had intended.
A 50-year-old man has been fined £280 for leaving a seven-year-old boy at home to go to the pub.