how do i do that. how do i use shsh?
You got alot of research and reading to do.
Do you remember when you opened up cydia if on the top of the page if it displayed something like this?: "This device has SHSHs on file for iPhone OS 3.1.2, 3.1.3 etc...
What you will need to do is edit your hosts file to redirect to cydias server to get your shshs in order for itunes to let you downgrade your iphone 3GS.
Then download either an official 3.1.2 or 3.1.3 ipsw file and try to hold down shift-restore or option-restore and select one of those firmware files.
If it lets you restore then you can use previous JB tools to JB it and then install ultrasnow thru cydia to unlock it.
But just by your questions I dont know if you're up for this long and complicated many step process.