If you want it to work, you'll need a contract. Otherwise, it's just a cool looking decoration for your shelves. Personally, I wish contracts weren't part of the landscape, but that's life.
I guess with iPhone 3gs it is not possible you need a contract to buy one. But with the older version the development team I heard has release a software that can unlock it.