score:1
If your visa is only valid for Germany, and is only valid for one entry - then you will need to apply for a different visa.
Here is a picture of what a visa sticker looks like (from this page), which is annotated by me:
This is the area for which your visa is valid. If it says "Schengen Staten" (as in the picture), then it is valid for the entire Schengen zone. The visa sample is issued by the Netherlands; in yours it may say something else.
Start date of your visa. You can only enter the zone on this date.
Now, according to the rules - a Schengen visa is valid for every Schengen state (see point #1 above). So you can request entry at any Schengen port.
However:
For short stay visas, you need to show documentation at the immigration control for the purpose of your visit. This may include proof of financial support, return ticket, invitation documents, hotel reservation, etc. If you don't have these documents you may be denied entry. I mention this because these documents may be specific to Germany (for example, you have an invitation letter from there, but are trying to enter in Spain). There is no guarantee you will be denied entry, but since you are already spending money to get there - why take the risk?
Some airlines (personal experience) refuse to board you for any destination other than the country that issued the visa - especially if this is your first trip on that visa.
There have been cases reported of subsequent denials of visas if you don't enter the initial country that issued the visa. Germany seems to be especially strict on this; other countries not so much.
In summary - as you are already spending money and probably don't want your trip ruined because you were denied entry; it is my recommendation that you enter Germany on your visa, and then select a convenient way to head to Spain and visit your friends.
Chances are, you can easily find a cheap flight or train ticket from Germany to Spain.
This way, you don't risk anything - and are guaranteed entry into Spain as there are no immigration controls between Schengen states.
Upvote:2
Especially if your visa is single-entry, using it for a completely different purpose than the one you applied for will be risky.
The visa is legally valid for entering Spain, but the border guards will (as they are supposed to) question you about your plans when you enter, and that's when you're at risk of getting the visa annulled pursuant to the Visa Code, article 34(1):
- A visa shall be annulled where it becomes evident that the conditions for issuing it were not met at the time when it was issued, in particular if there are serious grounds for believing that the visa was fraudulently obtained. A visa shall in principle be annulled by the competent authorities of the Member State which issued it. A visa may be annulled by the competent authorities of another Member State, in which case the authorities of the Member State that issued the visa shall be informed of such annulment.
The trouble is that in order to get Germany to issue a visa, you'd have to present a plan for going to Germany as your main destination with the visa application -- otherwise the German consulate would have rejected the application. So the border guards in Spain (or wherever you enter) will know that you filed such a plan with your application. If the tickets and other documentation you have to show at entry are for a completely different trip, the border guards may get the idea that the trip you originally applied for was a lie from the beginning and therefore decide that your visa should be annulled as fraudulently obtained.
It is not certain that this will happen -- if you manage to convince the border guards that you really truly did intend to go to Germany at the time you applied but changed your mind afterwards, then the above section won't apply to you, and you should be fine.
But still it feels like something of a gamble.
If you have time, you should probably make a new application to the Spanish consulate and ask them to revoke the German one. If you don't have time for this and have already paid for tickets to Spain, then an argument for chancing it could be made. Hey, it might work! But note that if your visa does get annulled (and you're sent back), this may make it harder for you to obtain another visa in the future.