Can I use an iPhone for Sprint without a contract from Sprint?

I just bought an iPhone 5 from a friend, and their previous carrier was Sprint. First off, I don't use Sprint and second off, I don't want to buy a contract or any type of service from Sprint at the moment. So for now, it's basically like an iTouch. My question is, when i get the phone from my friend, will I be able to use it? Or do I HAVE to buy service from Sprint to get it working?

If it's just off with no service then you can continue to use as an iPod with Wi-Fi only access. If you elect to get service elsewhere, well then you have a problem. Sprint by policy does not unlock their phones for rival domestic usage. Won't change until Feb '15 when they have to. So you will have to buy an unlock code online to use elsewhere. Make sure friend's iCloud account is removed from the device before taking it. Will cause headaches if it is not. Best luck.