Pto switch is back behind the PTO lever, kind of in front of the tire buried up behind everything. Where it lives, is usually full of clippings and is why it many times gets to acting funny.
I'm assuming it's an older 331, as they had an external fuel stop solenoid, on top of the engine (big solenoid hooked to the pump's lever). They won't shut off unless they have power applied to it. I hated them for safety purposes for that exact reason. Sometimes the combination box would die and they would not shut off.
Also, there are couple relays in the system that also can cause issues. I don't remember exactly where they are on the 331's, on the 227's and 222's they're under the seat, left of center, under a black plastic cover. Seen a few of them get corroded wires. On that subject, look closely at the main harness connectors as I've heard of a few getting pulled apart, or wires pulled out of the connectors.
Sounds like some basic electrical troubleshooting is in order. I'd highly suggest a shop manual, and make sure it's for the correct serial number. The newer ones had the fuel cut solenoid kind of built into the pump/engine block that when +12 was removed, the engine would die (works backwards of the older ones).