Carefully pry apart the base with a flathead screwdriver, and you’ll find a tiny circuit board stuffed with useful components. Then you can recycle just the bulb (be careful not to break it). Removing the bulb is the first thing they do at the recycler’s anyway.
I’ve opened up a few different brands, and the contents are all pretty much the same. A typical inventory includes 2 transistors, four 1N4005 diodes, assorted ceramic capacitors and resistors, a 10µF electrolytic capacitor, and a small coil transformer.
I don’t bother salvaging the resistors, but I like to use the film caps, transistors, and diodes to make guitar effects boxes. Fuzzes, boosts, and buffers — oh my!
For any of these effects, you assemble the circuits by soldering them on a small piece of perf board, and use leads to connect the board out to the battery snap and input/output jacks. The online schematic diagrams show how everything connects.