Thailand's Supreme Court has ordered ex-PM Thaksin Shinawatra to pay USD542 mil in taxes related to a 2006 share sale.