Sky cards are not transferable.
You can get them in Spain but they are expensive and a bit dodgy as Sky cannot officially permit the use of Sky outside of the UK & Ireland.
Best way to get one is to either do it yourself using a UK mobile in Spain or get someone in UK pretending to be you, in either case you will need to use a UK address. Cost is £20. Did this myself
You will need to activate the card in the Sky box you want to use to get the full benefit of the card, if you do it in Spain, only call Sky with a UK based mobile as they will now where you are and lock down the card.
Best of luck