Buying an unlocked iPhone 3G could be a costly affair. You could rather look to buy a locked iPhone and then get it unlocked. You can check the tutorials available online for this.
http://www.iphonerat.com/iphone/how-to-unlock-iphone-3g/