Need Appliance Repair Help? Ask a Technician for Answers ASAP
So unfortunately you have a fairly major issue. The reason the microwave shuts off after a few seconds is because it doesn't detect the magnetron pulling power to heat and create micro waves. That sparking you saw/smelled/heard is the magnetron arcing out usually to the wave guide. The magnetron would need to be replaced and area inside the wave guide that the magnetron arced to would need to be sanded and pained with microwave cavity paint to prevent it from arcing again in the future. The part number for the magnetron is 641858 and it's about $150 so it's not a cheap part. If you had a technician do the repair for you, it would be another $200-250 since it requires quite a bit of labor and uninstalling the microwave completely to replace the part and sand the wave guide down and such.
We are on the honor system here. Please remember to rate my service by selecting a star at the top of the screen before you leave today and reply back here letting me know with a rating of 1-5 stars (5 being the best). If you need anything else, just let me know. You can continue asking follow-up questions at no additional charge after rating my service if you still need assistance.