You can use a Freeview receiver / box in Spain.
The Freeview box connects to a TV aerial, not a satellite dish.
So the UK Freeview receiver will only receive the Spanish digital channels that are receivde by the TV aerial.
A UK Freeview box in Spain WILL NOT be able to receive UK TV channels!