Former Pakistani Prime Minister Imran Khan was served a show-cause notice on Tuesday and ordered to appear in court on August 31 in connection with contempt charges brought against him for making derogatory comments about a female judge at a rally in this city.