I’d do it properly rather than use that cut-up sim card solution above. You need to know the model of the phone though to know if it is an easy unlock or not.
A fair number of older phones can be done just with a code calculator you calculate the unlock code based on your IMEI number (*#06# to find it).
Quite a few phones can be unlocked with a USB cable using special software.
Some newer phones can only be unlocked with special magic boxes and expensive cables that attach to internal connections on the phone circuit board. If you have one of these phones, then your only choice is to take it to a shop and pay them the £20 to unlock it.
Joe