Although portable generators come in many different brands, styles and sizes, the shutdown procedure is pretty much the same for all of them. The three parameters involved are motor speed, electrical output and actual shutting down of the motor. After disconnecting the electrical outputs, either pressing a stop switch or shutting off a fuel cock will stop the motor. Check your owner's manual for specific details.
Turn off and disconnect all equipment from your generator.
Turn off the generator electrical output switch.
Set your generator throttle to the slowest speed position.
Depress the "kill" or "stop" switch and hold it until the engine stops.
Set the fuel cock or valve to the "off" position.