WASHINGTON (AP) _ Secretary of State George P. Shultz presented a black patent leather handbag Wednesday to British Prime Minister Margaret Thatcher in recognition, he said, of her talent for pulling the right statement from her bag at meetings of allied leaders.

Shultz said that in over six years in the job he had become accustomed to Mrs. Thatcher producing a perfect compromise statement from her bag ''like a rabbit out of a hat'' while other leaders were searching for the right stand to take on an alliance issues.

''Her role in the alliance has inspired us,'' Shultz said at a luncheon for the visiting prime minsiter. He toasted her ''leadership, energy and special powers of persuasion.''

Shultz pulled three statements from the bag which quoted Mrs. Thatcher's remarks in behalf of people demonstrating for freedom, in praise of President- elect George Bush and against terrorism.

In reply, Mrs. Thatcher paid tribute to Shultz, who will leave in January, as ''a true friend'' who pursued foreign policy goals with ''total integrity.''