If your first stop is in the UK then you will be able to buy a pay-as-you-go SIM at almost any supermarket or many corner shops, as well as in specialist phone shops. No registration or contract required. The advertised rates for data, calls and text messages should be the same in the UK, France, Spain or anywhere else within the EU. If you shop around the different networks you can choose from deals which simply charge per mb/minute from your remaining credit or you could buy a prepaid bundle of data upfront. I live in the UK and use the Three mobile network which I have found works well and cheaply on my occasional trips to other European countries.
@fraluchi makes a good point above about making sure that it is possible for you to top-up your credit while abroad unless you are sure that your initial purchase of credit is enough to last for your whole trip.