The most famous car sharing site was bugride.com, but this seems to have closed down now. It is no longer as easy to find car sharing websites as it used to be, but with the price of gas so incredibly high and the threat of climate change on people's minds, there has never a more important time to carshare.
It is as easy to offer a ride as it is to look for one on these car sharing sites. So if you're planning on renting a car in Spain, why not advertise on one of these sites yourself?
Car sharing is an old practice. "When you drive alone, you drive with Hitler" was a car pool propaganda poster from World War II, which I have seen adapted for the present day (swapping "Hitler" for "Bin Laden"). I'm not sure car sharing is the most effective anti-terrorism move in the world, but it is certainly good for the environment.
Car Sharing Resources in Spain and the Rest of EuropeUnfortunately, there are few good English language resources for car sharing in Europe.
French site, with lots of people traveling from France to Spain. Google Translate is your friend here.
Rival site with almost the same address as the one above.
Very popular German site, but the distance between Germany and Spain means there will be less journeys than on the French sites.
Doesn't let you browse, which is annoying, but it does have lots of rides on offer in Spain (I found 48 from Barcelona to Madrid).
Nominally for offering your couch to visitors, the very active forum is a good way to find or offer ridesharing.