Start with deciding the legal form

One of the very first steps when the investor has decided to move forward with the registration of the company in Spain is choosing the legal form. Here's a high-level view of the options at hand, and the steps forward:
Figure out what type of business you want to start: In Spain, you can choose between two main types of business structures: a sociedad limitada (SL) or a sociedad anónima (SA). The SL is a limited liability company, and the SA is a joint stock company. The SL type of structure requires at least one shareholders and a minimum share capital of 3.000€, whereas a SA will require a minimum of 60.000€, of which at least 25% must be deposited at the time of signing before the Notary.
Other type of business might include: Incorporating a subsidiary when there is an existent parent organisation established in a foreign jurisdiction. A subsidiary established in Spain is seen as a local entity from a legal point of view, and must follow the same rules stipulated in the Spanish Commercial Law.
Register your company: To get your company up and running, you'll need to file some paperwork with the Mercantile Registry. This includes articles of association, proof that you've deposited the required share capital, and the founders' ID.
Get any necessary licenses and permits: Depending on what you're selling or offering as a service, you might need to get a license from the local council. For example, businesses that sell food or drinks, or offer other services might need a license.
Set up a business bank account: You'll need a business bank account to manage your company's finances. You can open one at most banks in Madrid. You'll need to provide identification documents, proof of your company's registration, and other documents the bank might require.
It's always a good idea to get advice from a referenced law firm to make sure you're following all the legal requirements, and that you're choosing the most advantageous business type when setting up your company in Spain.