Here's an old dynamo flashlight, converted to charge small, AAA, and AA batteries (Note: charging batteries with bigger capacity will take more power and time...)
Step 1: Unscrew Everything
Make sure you also unscrew the top cap
Step 2: Connection
if you first buy the product, make sure you cut off the battery. DO NOT cut off the battery with the wire connected to it. Make sure you cut the wire connecting the positive and negative side of the circuit board/dynamo, near the battery (leaving the battery without wires) then throw it away, you don't want that to keep that, it can explode anytime there's a sudden temperature change.
Next, you should extend the wires by soldering wires connecting to the exposed wires (the one that was connected to the battery)
Step 3: Holes
Punch holes to the detached bit. It may be the back part, or the front part, either way you should punch 2 holes through it, and that's where you put the extended wires
Step 4: Put It All Together
Next thing is to put everything together and testing the device by connecting the wires to either a volt tester, or a much cheaper way, connecting an LED bulb to it.
Step 5: Done
Here's me testing the device by connecting it directly to the exposed wires in a solar powered lawn light
to make sure it wasn't charging I fliped the solar panel facing the ground, then here you can see the battery charging, then powering the LED bulb