Hi.

I am hoping to get a part-time contract with a Spanish co and commute from UK to ensure that I am not tax resident there.
Do I still need to register with local Spanish office the get the tax number etc?
Will the fact that I'll be in fact having a contract through agency help in any way (i.e. my contract will be with UK based agency to perform duties in Spain)?