Locate and remove the screws holding the cover over the recoil spring. There will be anywhere from four to eight, typically with small hex heads. Use a nut driver to loosen and remove them. Lift the cover from the motor and turn it upside down to reveal the spring-loaded starter cord assembly on a pulley in the center of the cover. Wrap these in a piece of tape to keep them together.
Loosen the nut in the center of the pulley with a socket wrench and lift it out. The broken spring will be resting loosely around this; discard the entire assembly. Cut the handle loose from the pull cord, so that it can pass through the hole in the cover with a knife.
Install the new pulley onto the shaft you removed the nut from. The pulley will have a new pull cord prewrapped on it, with tape on its end. Replace the nut and tighten it, before attempting to install the pull cord through the cover. Release the tape and thread the cord through the hole in the cover and the handle. Knot it to prevent slippage, but do not attempt to pull the cord yet.
Turn the cover over and place it on top of the starter clutch. Rotate the cord pulley slightly, if needed, to fit over the gear on top of the starter clutch. Reinstall and tighten the screws that hold the pull-cord-assembly cover with the nut driver.
Pull the cord out until the spring makes two full turns. Release it. It should spring back into place. This will reset the tension on the new spring. Start your small engine as you normally would.