According to the Seguridad Social - Reglamentos Comunitarios which is the system under which workers working for a foreign company in Spain fall under: Workers contracted by foreign businesses to work in Spain.
"Workers contracted by a foreign business with the aim of carrying on their activity in Spain will be subject to Spanish legislation regarding the Social Security contributions before they are contracted to work. These workers are not considered displaced workers under the social security act, and are subject to the legislation of the country in which they carry out their activity.
The foreign business must apply to the corresponding Tesoreria General or Administration for a social security contribution account number to register the business with the Spanish social security and hence subsequently register the worker with the Spanish social security."
There are really 2 issues:
- As an employed person you want to be covered by the social security system of the country in which you are carrying out your activity.
- To be covered comprehensively in the country in which you carry out your activity you need to contribute to that countries social security system.
In order to be able to contribute there has to be a mechanism for you to be able to contribute and for your employer to be able to pay their share of employers contribution into the social security system of the country in which you are working. This is the same for any EU country.
The way that employees social security contributions are collected in the UK are through the employer. Employees in the UK do not personally pay their social security contributions instead they are deducted at source by the employer who in turns pays into the UK social security system.
It's no different in Spain, regardless of whether you work for a Spanish or foreign employer in Spain, social security contributions are deducted at source and then paid by the employer to the Spanish social security system. In the UK employers have an employers reference number to which employees currently working for that employer are registered to. The same in Spain each employer has a number to which employees are registered to and deductions are made and contributed under that number.
The social security make no charge for a foreign business to register as an employer or to register their employees with the social security. We have registered several foreign employers with the Spanish social security and tax system, and process their tax and social security obligations without any problems whatsoever.
So there is no need to worry about working illegally or not being able to contribute in the country in which you are working, your employer just needs to register as an employer and subsequently register you as an employee.
By Spain Gestor