First with this sort of issue you need to stop plugging it in to shore power. The ATS is faulty, and it could start a fire. If you don't feel confident enough to troubleshoot and repair, it then get to someone that can.
Most likely the ATS will need replacing along with the Shore power cable. While you are at it if you don't have one I would also add a Surge protector, either one built into the ATS or a separate one just before the surge protector. It's also very important to check the wires leading out of the ATS, they may be burnt also.
Trust me been there done that. 2 different MH's