The majority of the crimes are commited by forgeiners in Spain, followed by gypsies. 80% of the people jailed are inmigrants.

From there we can't conclude "all the inmigrants are criminals" or "all gypsies are criminals".

It is obvious that the people with less resources will tend with more probability to be criminals. It is both a cultural issue (cultures that give less value to life or crime than others) and an economical one.

I really don't see the connection with racism...

Fernando