'Get thee to a nunnery," Hamlet famously said to Ophelia. But, nowadays, you must have a very real vocation if you are to live out your life in a religious order. And those vocations are falling: according to a recent survey, only 18 men and 13 women entered British monasteries and nunneries last year.

These figures come sharply to mind while watching Hugh Whitemore's The Best of Friends. The play is constructed from the writings of Dame Laurentia McLachlan, Sir Sydney Cockerell, and George Bernard Shaw.

McLachlan spent 70 of her 87 years in the enclosed Benedictine Abbey at Stanbrook, rising to become Abbess. Cockerell was a visionary director of the Fitzwilliam Museum in Cambridge, and Shaw a highly opinionated critic and playwright: "Plot?" he was fond of saying, "Plot is the curse of serious drama." Here indeed were three strong characters. But their friendship lasted for many decades, with only one big quarrel Dame Laurentia condemned one of Shaw's books, but she forgave him after a while.

The Best of Friends is set in an all-purpose space that has the atmosphere of a large study in a Victorian vicarage (designer Simon Higlett). The friends wander in and out, and proceed to exchange views on matters both great and small, from the glories of spring birdsong to metaphysics. This tends to suggest that they met up every now and then, but in fact the friendship was largely carried on by correspondence it could hardly have been otherwise, as Dame Laurentia was in an enclosed order.

Shaw visited her, but would certainly have had to converse through an iron grill. There is a delightful scene, drawn from the early years of the friendship, when a young Laurentia is actually allowed to spend an afternoon with Cockerell studying medieval manuscripts in the British Museum. Even as her death approached, Laurentia remembered that day with girlish enthusiasm.

The play needs a strong cast, and certainly gets it in this production (director James Roose Evans). Patricia Routledge, in a role that's a world away from the snobbish Hyacinth in Keeping Up Appearances, provides a robust, no-nonsense Laurentia: "A nun ought to be a brave person, not just a nice little thing," she announces. Michael Pennington is thoroughly convincing as bright and perky Cockerell, while Roy Dotrice, surely one of Britain's most underrated actors, provides all Shaw's rough edges and sharp opinions without ever lapsing into caricature. Altogether this is a fascinating, if occasionally repetitive, insight into the thoughts of three very great friends.

The Best of Friends continues tonight and tomorrow at Milton Keynes Theatre.