Can I put my current pay as you go SIM card in a contract phone?

I want to get the iPhone 6 on contract but I want to keep my number. I'm on o2, so if I go to on o2 shop and ask them if I can keep my number will they let me do it? What is the process of it all because this is the first time I'll be getting a contract phone

You ask them to transfer the number to your contract. It takes minutes.

Explain that you're currently on PAYG and you'd like to take your number across on to the contract. They'll arrange everything whether you do it in a store or over the phone.