I found this surprisingly easy with a new car in Italy. This was while the UK was still in the EU. I had to show the documents for the car, invoice and COC (Certificate of Compliance ), pay the IVA (VAT) in Italy, and then a plate was issued. With the registration number I was able to get insurance. We then flew to the UK, went to the factory, stuck the plates on the car, and drove home.
That was March 20, 2012

The photo used for my avatar was taken on the homeward trip.
I am not sure if this can be done with a second hand car. You would probably be asked for the COC in order to register it in Portugal even if it is second hand. Check carefully on the rules about having to pay VAT on a second hand vehicle too. I think a certain minimum age and mileage may be required to avoid having to pay VAT.
I can Imagine that to transfer the registration to you a residential address in the UK would be required.
In the end your easist option may simply be to get someone to transport it for you. There are vehicle recovery services that bring cars from the EU back to the UK. They may well often have outward trips to the EU that are without a full load.