"He knew what he was doing and was watching for cars. But I wasn't gonna say, 'OK have a nice life, little guy.' And I didn't want his Slurpees to melt, so I offered him a ride home," Riley told "Today."
When the officer and boy got to the house, Riley asked to check on the brother who was waiting for his food.
Riley found out that the two brothers, the younger being 8, were left alone as their mother worked because she had no other option until camp started.
Riley called the boys’ mother and she had no idea that the older brother had left. The officer also noticed that there was no food at the home that the children could make for themselves.
"After talking to her a bit, I learned it was a tough time for them. It was week two of her not receiving her benefits and it wouldn't be resolved for at least another week," Riley explained.
She told the officer that it would be tough, but they would be able to cope. He also told her about other options to help offset the financial issues, but he said that wasn’t enough.
So, Riley left the house and went straight to the grocery store to stock up on food for the struggling family. He paid for most of it himself, along with a donation from his sergeant and another officer, "Today" reported.
Austin police officials posted a photo of a filled cart to the department's Facebook page and included a writeup of what had happened, commending him for taking the extra step to make sure the family had what it needed.
>> Read more trending news
>> Need something to lift your spirits? Read more uplifting news
Riley went back and he and the two boys put the food away, then the boys sat down, did their summer reading and finished their chores to help out their mom, at Riley's request, "Today" reported.
He also talked to the boys about leaving the house alone, Fox News reported.