After completing the course in Spain, a maximum 8-month work permit will be allotted. After getting the work permit, you must stay in Spain for at least 5 years by extending the work permit. Then, you can apply for a PR (Resident permit) in Spain.