You will need to declare the foreign dividends in the foreign section of the Self Assessment tax return (entries must be in pounds sterling) and claim FTCR for each foreign dividend entry.
Please check the double taxation agreements for France and Spain.
This guidance will show you how much tax relief you are entitled to.
When entering the dividend and tax deducted using the online return, you will need to show the percentage of relief available, eg. 15%.
At the end of the entries, click on 'add' and repeat for each foreign country you have dividends from.
This will allow you to sumarise your foreign dividends before saving and continuing.