This sample shows how you can defer shadow map calculations to separate full-screen pass using a depth buffer, effectively decoupling your shadowing routines from your main lighting pass. The main benefits are that your pipeline can be greatly simplified, as well as improved efficiency during shadow occlusion generation. Uses XNA 3.0, includes PC and Xbox 360 projects. Hosted on Ziggyware.
Also hosted here, since Ziggyware has been down.
I also wrote the code for a follow-up sample that implements Cascaded Shadow Maps, but never got around to doing a write-up. You can get that here.