Is it possible to restore an iphone without the screen?

Recently someone gave me an iPhone 3gs without a screen because it was broken. I plugged it in and it seems to be working fine but the previous owner's password is still on it and I can't seem to find a way to do anything without the screen. Is there any way I could restore it or something without a screen?

Well, even if you can restore it, how can you use it without a screen? You make no sense!