shift + command + option + 4, then press spacebar with your tongue if you run out of fingers. your cursor will turn into a camera, then click on a window to take a picture of just that window. the file will be cropped to the window boundaries and saved as a PDF on your desktop.
you don't need option for taking pictures of a specific window. just press shift-command-4, you will get the selector (you can use that one to select an area for capture), then press space (you can release the other ones) and then choose the window to capture.