In instances where you need to work in an area that doesn't have electrical sockets readily available, there is an easy way to convert a light socket into an electrical socket using a special adaptor. This adaptor screws into the light socket and has an electrical socket on the side of it. Beneath the electrical socket is another light socket so that you can still use the electrical source for light. There are even pull chain models that allow you to turn the adaptor on and off.
Visit your local hardware store or an online retailer to purchase an outlet socket adaptor.
Flip the light switch to the "off" position, and remove the existing light bulb.
Screw the outlet socket adaptor into the light socket.
Screw the light bulb into the outlet socket adaptor.
Flip the switch to the "on" position, and plug in an electrical device to test your outlet socket adaptor.
Outlet socket adaptors are made for indoor use. It would be safe to use an outlet socket adaptor outdoors temporarily, in dry conditions, as long as it isn't left outside for an extended period of time.