Until a few years ago, you didn't actually take out a contract directly with a network. But you were billed through a third party called a Service Provider.
I got an O2 contract at phones4U, which was with provided by Singlepoint who were owned by Vodafone!
Carphone Warehouse were one of there service providers, but stopped signing up new customers a few years ago. So if you go there now, you will be signed up directly with O2. The only difference would be that Carphone Warehouse would be responsible for supporting the handset.