If you dispose of foreign shares and make a gain, then this gain is liable to tax.
You need to work out the value of the shares in pounds sterling at the time of purchase and the disposal value of the shares in pounds sterling, to work out if there is a gain.
You would enter the gains on SA108 capital gains summary, and if you were claiming for foreign tax paid, you would also include on SA106 boxes 33 to 40.
The official exchange rates can be found at:
Exchange rates from HMRC in CSV and XML format
You are free to use either the monthly, yearly average or the spot rate to convert to sterling.