First up you might want to try disconnecting everything from the receiver (speakers, hdmi...whatever other cables) and see if it still shuts off ..if it doesn't might want to start hooking stuff back up on at a time (double checking for frayed speaker wires and for shorted connections on the speakers themselves.
Should the unit still shut off with nothing connected .. you might want to try resetting the unit.
here is a link to doing a factory reset on many onkyo receivers you might want to give this a go.. since you didn't list a model this may or may not apply to yours check i guess.
http/www.eu.onkyo.com/en/videos/factory-reset-of-an-tx-nr609-and-other-57264.html
if it still shuts off after doing that stuff it might well just have a hardware fault and how to proceed I guess depends on it it is in warranty and what you want to do.
Should you decide / have to bag the onkyo I have had for over a year now a Yamaha RX-Vxxx receiver (RX-V573 in my case old model now) I am quite please with it's performance and features... well worth checking out should the onkyo be toast.