When you say shuts off, do you mean it goes dead as if someone unplugged it, or does it stop as if someone hit the Stop pad?
If it is going dead, it sounds like the magnetron is overheating and opening the thermostat.
This can be caused when the internal cooling fan is not running or by a magnetron that is failing.
When I say internal cooling fan, I do not mean the hood vent exhaust fan which you can turn on and off manually.
I'm instead talking about the internal fan which comes on automatically whenever you microwave.
It is vital that the cooling fan runs, or the magnetron will be destroyed.
If you or someone you know
decide to look into it, we have critical safety information and
disassembly information at our site, and our link is at our listing here on FixYa
You can usually find helpful exploded view diagrams and order parts by entering your full model number here
should also be a "mini-manual" hidden inside the unit behind the
control panel or hidden on the left side behind the grille, which is
when troubleshooting & testing.We're happy to help you with free advice and we'd appreciate your thoughtful rating of our answer.