Government figures show the British economy shrank during the third quarter of 2022, indicating that a recession was on the horizon as inflation and high energy prices continued to squeeze the country.