Isabella’s quandary in the Shakespeare play “Measure for Measure” is a little like Joan’s in the 2012 season of “Mad Men.” Should a woman sleep with a man she finds repellent if by doing so she serves a greater good? And how much greater does that good have to be? On “Mad Men,” it was a matter of crass commerce, an advertising agency getting its first big auto account. In “Measure for Measure,” it is a question of the woman’s saving her brother from execution. But this story being a product of Elizabethan England, when notions of immortal damnation were taken more personally, the playwright cannot let her fall into bed with just anybody. He cannot let her fall into bed at all.

The Shakespeare Theater of New Jersey’s handsome new production of “Measure for Measure,” now at the F. M. Kirby Shakespeare Theater, is ultimately very amusing. But those who don’t know this particular work may have to stick with it awhile to become involved. The play, which has had just two Broadway productions, deserves a chance, if only for its topicality. “Measure for Measure,” written around 1603, deals with the dangers of self-righteous, religious people gaining power in government and using that power immorally: putting citizens to death for fornication, and shutting down houses of prostitution, while not being so pure about their own sex lives. Imagine.

Our villain is Angelo (Sean Mahan), a strict judge who finds himself in power in Vienna when Duke Vincentio (Bruce Turk) goes away on a mysterious diplomatic mission. Isabella (Erin Partin) is in a convent, in training for a life of sacrifice and purity, when she learns that her brother, Claudio (James Knight), is to be beheaded, for having impregnated his fiancée, Julietta (Rachael Fox).

When young, lovely Isabella goes to Angelo to beg for her brother’s life, Angelo makes her a proposition, in every sense. If she will yield her virginity to him, he will pardon Claudio. And it turns out that he was never even planning to live up to that sleazy bargain. (At least the client in “Mad Men” kept his word.) This being a romantic comedy as well as a so-called problem play, deviousness on the part of good people, including what Shakespeare professors refer to as a “bed trick,” is employed. But the deeper question is never far from the surface: whether a sin committed to help another human being should or could be seen as charity instead.

I never believed a word that Mr. Mahan’s Angelo said, which is character-appropriate, but unfortunately that included his avowed attraction to Ms. Partin’s Isabella. Ms. Partin, who was recently seen here as Maria in “Twelfth Night” and Agnès in “The School for Wives,” gives a very entertaining and compelling performance, with a clear command of what her lines actually mean. In a much smaller role, Greg Jackson is continually funny, and does a memorable exit, as the debauched lord Lucio. As Duke Vincentio, Mr. Turk seems stiff at first, but disguised as a friar, and returning as the duke in the final scene, he is lovably comic.

Bonnie J. Monte, the company’s longtime artistic director, not only directed this production but also is listed as a set designer, along with Brian Ruggaber. Whoever did what, it’s a glamorous golden set, often focused on Angelo’s gilded desk with cabriole legs and a few ornate chairs. Paul Canada’s costume designs are winning and elegant.

Audiences won’t understand all the words — a problem hardly limited to this company. As a result, you may miss some crucial plot details, like the fact that Claudio and Julietta were really considered married; Claudio just had not paid for the banns. But contemporary audiences are unlikely to have called for the death penalty anyway.