Rendering to a texture?

I want to produce a shadow effect on my scene. This means rendering the scene from the point of view of the lights in the scene. then compairing the Depth buffer values to those of the actual view. My questions is, how would i render the scene from the lights point of view, then save the depth buffer information, then flush the drawn image from memory redraw the scene for either the next light, or the actual view.

>> My questions is, how would i render the scene from the lights point of view, then save the depth buffer information, then flush the drawn image from memory redraw the scene for either the next light, or the actual view.<<

this is simply how depthmaps work, there is further info about this around the web (esp see the nvidia site)
strange questions btw >>how would i render the scene from the lights point of view<<
how would u render (picture) it from the camera
etc etc