How can I retrieve files from a corrupted pen drive?

I have stored a lot of important files in my pendrive that has been corrupted. Now whenever I try to open the pen drive it asks for formatting. I know that if I format it, I would definitely lose my important files forever. Please suggest that how I can get my files back.
