Hi
If your pension is a private pension or non government pension, you need to check the double taxation agreement.
The digest at
Digest of Double Taxation Treaties will advise.
Pensions paid in regular intervals eg monthly and 'trivial commutaion lump sums' are not taxable in the UK.
You can dowload and print of the DT individual UK / spain form here
Double Taxation: UK - Spain (Form Spain-Individual)
Please complete all appropriate sections, sign and send the form to your local tax office in Spain.
They will validate the form and return it to you with a "Residencia Fiscal en España Convenio". You need to send the form and the Residencia Fiscal en España Convenio to HMRC.
The HMRC address to send it to, is on the front page of the form.
Thank you