Spain is slowly trying to change a system where something like 20% of the workforce work black, but it will take a while.
A foreigner, especially, trying to start a legal business in Spain will find it almost impossible. The bureaucracy is mindboggling and designed to obstruct businesses. That’s why the country has the Gestoria system, a buffer between private individuals and the state.
Even if your Spanish is fluent and you’ve studied Spanish law, there is no point in trudging along to the various official departments for your paperwork, instead you are better off seeing Pepe, the Gestor, in his little office in the side street.
He can achieve more in ten minutes on the phone to his contacts, than your month of queuing in front of nasty funcinarios. He will have your papers ready for you in a day or so, all stamped up and legal.
And he will want paying in cash. That’s how it starts and that’s how it will go on.