Hi, You need to identify what is running when you close the door, in all probability it will be either the turntable motor or the magnetron cooling fan, as generally there is nothing else active at this time, and even those two items should not run until cooking starts. If they are it points to a failure usually in the door switches, or possibly the turntable motor has gone to earth and is using that as its neutral thereby activating usually the lamp and fan motor, but not always.
As far as the cutting out is concerned maybe the air intake at the back of the oven is blocked this would explain why the unit over heats and shuts down.
Contact me via microwave-repairs.co.uk if you need further help.
patrick
October 2010