Toyota has agreed to pay US$25.5m to settle out of court a class action lawsuit in the US brought by shareholders over its large-scale recalls in the country.