From “Mary Shelley” to “Colette,” recent years have seen a surge of movies particularly surrounding the lives of female authors. Longtime fans of these writers’ work will no doubt comprise a large part of the audience for these films, but there’s something universally intriguing about learning who the authors were off the page. Was the writer anything like her characters? How did reality influence her fiction? Enter Shirley,” a movie that places the reclusive and enigmatic horror writer Shirley Jackson (Elisabeth Moss) center-stage for all the world to see. The film transcends the biopic genre, less concerned with getting the facts straight than in allowing the viewer a whirlwind glimpse into the inner workings of Shirley’s brain.

The movie begins in the 1950s with a newly married couple, Rose (Odessa Young) and Fred Nemser (Logan Lerman), who move in temporarily with Shirley and her husband Stanley Hyman (Michael Stuhlbarg), a professor of literature at Bennington College (Vt.). Fred applies for a teaching position at Bennington, while Rose hopes to audit classes. While Fred and Stanley’s lives revolve around the campus, Rose’s own academic aspirations grind to a halt when Stanley pressures her to keep house and prepare meals. Shirley, Stanley explains to Rose — in addition to the stress of maintaining a writing career — suffers from depression and agoraphobia, and their housekeeper just quit. Rose reluctantly agrees but soon finds her life more and more confined to the home, with Shirley as her sole companion. Before long, Rose becomes trapped not only within the walls of the house but inside Shirley’s imagination, becoming the inspiration for Shirley’s latest horror novel, “Hangsaman.”

From Left to Right: Michael Stuhlbarg and Elisabeth Moss in “Shirley.”/Courtesy of NEON

Early in the film, it appears Shirley has successfully evaded the role of the 1950s housewife because of her writing career, especially when contrasted with the countless shots of Rose scrubbing baseboards, scraping pans and pouring coffee. However, the movie clarifies that a woman doesn’t have to cook, clean or even leave the house to be inhibited by the male gaze. When we first meet Shirley, she’s seated in an armchair surrounded by a small army of houseguests hanging onto her every word. Her awareness of others’ eyes — the studied way she speaks, smiles and smokes — is palpable. Shirley might be the mastermind behind the worlds of her own creation, but her work doesn’t belong to her. Stanley criticizes everything she writes, while her audience in the living room demands access to her inspiration and creative process. Moss masterfully conveys a character forced to fulfill unattainable expectations: expectations as a woman, writer and wife.

Nodding to Jackson’s fans, the film contains ample references to her short stories and novels. Children throw stones in an alleyway, echoing the ending of her infamous short story “The Lottery.” Shirley plucks a death cap mushroom for Rose, as in her novella “We Have Always Lived in the Castle.” More than just clever references, these moments blur the line between reality and the world of Jackson’s fiction. As the film progresses, the viewer is left uncertain about what’s real versus what’s going on inside of Shirley’s head. Vivid sequences of feverish imagination set “Shirley” apart, but they also provide some of the weakest moments of the film, in which main characters cease to be real people and instead are occupants of Shirley’s mindscape. While they are not so flat as to be cardboard, the movie does sacrifice flesh-and-blood characterization in its relentless quest to evoke an atmosphere.

To paraphrase one of Shirley’s lines, “Freud would have had a field day” with all of the subtext in this film. “Shirley” would rather be thought-provoking than anything else, more focused on ideas than the plotline. But when the film does manage to explicitly articulate the undercurrent of femininity and performance in a way that furthers the story, the result is breathtaking. Such moments occur when Shirley breaks down crying in front of a dressing room mirror in a department store, or when Fred uncovers a stash of nettle — a “fertility offering” — underneath the bed and demands whether Rose actually believes in hexes and witchcraft, symbolic of subversive female power. More of these real-world conflicts would have been a welcome change of pace in a film dwelling too often in the theoretical.

How much of the film’s portrayal of Jackson aligns with who the author was in real life? In the world of “Shirley,” such a question doesn’t matter. The film breathes life into the “thrillingly horrible” persona that her devout readers (secretly) hope their favorite horror author might have been. Shirley, like all women, survives by staying one step ahead of the role she is expected to play, knowing that if she doesn’t measure up, the mob is waiting, ready to throw stones.

Rating: A-