Leave the connector unplugged, pinch the fuel line just before the carb, using a thin 1\2" open end wrench, remove the solenoid. Gas will spill from the carb bowl. Catch it. If possible, leave the carb bowl in place.
On the end of the solenoid is a little plunger. Many have rubber tips. Using side cutters, cut the plunger off close to the body of the solenoid. Reinstall the solenoid in the card and snug it in. Try to start the engine. It should run.
You can use it this was or replace the solenoid. These are installed to prevent backfiring, or run-on, after the key is turned off. My Toro machines backfire even with them in. If so, just lower the idle speed before shutting off.