If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Light the bulb by finding a path between the light bulb and the battery. Rotate a path by clicking on it.
Light the lamp by connecting the lamp with the main battery. Click on a wire to rotate it.