Before making The Shining, Stanley Kubrick directed the 1975 movie Barry Lyndon, a highly visual period film about an Irish man who attempts to make his way into the English aristocracy. Despite its technical achievement, the film was not a box office success in the United States and was derided by critics for being too long and too slow. Kubrick, disappointed with Barry Lyndon's lack of success, realized he needed to make a film that would be commercially viable as well as artistically fulfilling. Stephen King was told that Kubrick had his staff bring him stacks of horror books as he planted himself in his office to read them all. "Kubrick's secretary heard the sound of each book hitting the wall as the director flung it into a reject pile after reading the first few pages. Finally one day the secretary noticed it had been a while since she had heard the thud of another writer's work biting the dust. She walked in to check on her boss and found Kubrick deeply engrossed in reading The Shining."
After having chosen Stephen King's novel The Shining as a basis for his next project, and after a pre-production phase, Kubrick had sets constructed on soundstages at EMI Elstree Studios in Borehamwood, Hertfordshire, Britain — to enable chronological filming and changes during production, he used several stages at EMI Elstree Studios in order to make all sets available during the complete duration of production. The set for the Overlook Hotel was then the largest ever built at Elstree, including a life-size re-creation of the exterior of the hotel. Some of the interior designs of the Overlook Hotel set were based on those of the Ahwahnee Hotel in Yosemite National Park.
While most of the interior shots, and even some of the Overlook exterior shots were taken on studio sets, a few exterior shots were taken on location by a second-unit crew headed by Jan Harlan: Saint Mary Lake with Wild Goose Island in Glacier National Park, Montana was the filming location for the aerial shots of the opening scenes, with the Volkswagen Beetle driving along Going-to-the-Sun Road. The Timberline Lodge on Mount Hood in Oregon was filmed for a few of the exterior shots of the fictional Overlook Hotel, and notably absent in these shots is the hedge maze — something the Timberline Lodge does not have. In spring 1979, due to intense lighting used by Kubrick, the set burst into flames and destroyed the building; it had to be rebuilt.
This film was among the first half-dozen to use the newly developed Steadicam (after the 1976 films Bound for Glory, Marathon Man, and Rocky), and was Kubrick's first use of it. This is a stabilizing mount for a motion picture camera, which mechanically separates the operator's movement from the camera's, allowing smooth tracking shots while the operator is moving over an uneven surface. It essentially combines the stabilized steady footage of a regular mount with the fluidity and flexibility of a handheld camera. The inventor of the Steadicam, Garrett Brown, was heavily involved with the production. Brown published an article in American Cinematographer about his experience, and contributed to the audio commentary on the 2007 DVD release of The Shining. Brown describes his excitement taking his first tour of the sets which offered "further possibilities for the Steadicam". This tour convinced Brown to become personally involved with the production. Kubrick was not "just talking of stunt shots and staircases". Rather he would use the Steadicam "as it was intended to be used — as a tool which can help get the lens where it's wanted in space and time without the classic limitations of the dolly and crane". Brown used an 18 mm Cooke lens that allowed the Steadicam to pass within an inch of walls and door frames.
Kubrick personally aided in modifying the Steadicam's video transmission technology. Brown states his own abilities to operate the Steadicam were refined by working on Kubrick's film. For this film, Brown developed a two-handed technique, which enabled him to maintain the camera at one height while panning and tilting the camera. In addition to tracking shots from behind, the Steadicam enabled shooting in constricted rooms without flying out walls, or backing the camera into doors. Brown notes that:
One of the most talked-about shots in the picture is the eerie tracking sequence which follows Danny as he pedals at high speed through corridor after corridor on his plastic Big Wheel tricycle. The soundtrack explodes with noise when the wheel is on wooden flooring and is abruptly silent as it crosses over carpet. We needed to have the lens just a few inches from the floor and to travel rapidly just behind or ahead of the bike.
This required the Steadicam to be on a special mount modeled on a wheelchair in which the operator sat while pulling a platform with the sound man. The weight of the rig and its occupants proved to be too much for the original tires however, resulting in a blowout one day that almost caused a serious crash. Solid tires were then mounted on the rig. Kubrick also had a highly accurate speedometer mounted on the rig so as to duplicate the exact tempo of a given shot so that Brown could perform take after identical take. Brown also discusses how the scenes in the hedge maze were shot with a Steadicam.
The Shining had a prolonged and arduous production period, often with very long workdays. Principal photography took over a year to complete, due to Kubrick's highly methodical nature. Actress Shelley Duvall did not get on with Kubrick, frequently arguing with him on set about lines in the script, her acting techniques and numerous other things. Duvall eventually became so overwhelmed by the stress of her role that she became physically ill for months. At one point, she was under so much stress that her hair began to fall out. The shooting script was being changed constantly, sometimes several times a day, adding more stress. Jack Nicholson eventually became so frustrated with the ever-changing script that he would throw away the copies that the production team would give to him to memorize, knowing that it was just going to change anyway. He learned most of his lines just minutes before filming them. Nicholson was living in London with his then-girlfriend Anjelica Huston and her younger sister, Allegra, who testified to his long shooting days.
Nicholson was Kubrick's first choice for the role of Jack Torrance; other actors considered included Robert De Niro (who claims the film gave him nightmares for a month), Robin Williams, and Harrison Ford, all of whom met with Stephen King's disapproval.
The opening panorama shots (outtakes of which were used by Ridley Scott for the closing moments of the original cut of the film Blade Runner) and scenes of the Volkswagen Beetle on the road to the hotel were filmed from a helicopter in Glacier National Park in Montana on the Going-to-the-Sun Road.
For the final Gold Room sequence, Kubrick instructed the extras (via megaphone) not to talk, "but to mime conversation to each other. Kubrick knew from years of scrutinizing thousands of films that extras could often mime their business by nodding and using large gestures that look fake. He told them to act naturally to give the scene a chilling sense of time-tripping realism as Jack walks from the seventies into the roaring twenties".
For international versions of the film, Kubrick shot different takes of Wendy reading the typewriter pages in different languages. For each language, a suitable idiom was used: German (Was du heute kannst besorgen, das verschiebe nicht auf morgen — "Never put off till tomorrow what may be done today"), Italian (Il mattino ha l’oro in bocca — "The morning has gold in its mouth"), French (Un «Tiens» vaut mieux que deux «Tu l'auras» — "One 'here you go' is worth more than two 'you'll have it'", the equivalent of "A bird in the hand is worth two in the bush"), Spanish (No por mucho madrugar amanece más temprano — "No matter how early you get up, you can't make the sun rise any sooner.") These alternate shots were not included with the DVD release, where only the English phrase "all work and no play makes Jack a dull boy" was used.
In his search to find the right actor to play Danny, Kubrick sent a husband and wife team, Leon and Kersti Vitali, to Chicago, Denver, and Cincinnati to create an interview pool of 5,000 boys over a six-month period. These cities were chosen since Kubrick was looking for a boy with an accent which fell in between Jack Nicholson's and Shelley Duvall's speech patterns.
Speaking about the theme of the film, Kubrick stated that "there's something inherently wrong with the human personality. There's an evil side to it. One of the things that horror stories can do is to show us the archetypes of the unconscious; we can see the dark side without having to confront it directly".
During production, Kubrick screened David Lynch's Eraserhead (1977) to the cast and crew, to convey the mood he wanted to achieve for the film.
The door that Jack chops through with the axe near the end of the film was a real door. Kubrick had originally shot this scene with a fake door, but Nicholson, who had worked as a volunteer fire marshal, tore it down too quickly. Jack's line, "Heeeere's Johnny!", is taken from Ed McMahon's famous introduction to The Tonight Show Starring Johnny Carson, and was improvised by Nicholson. Kubrick, who had lived in England for some time, was unaware of the significance of the line, and nearly used a different take. Carson later used the Nicholson clip to open his 1980 anniversary show on NBC.
Joe Turkel stated in a 2014 interview that they rehearsed the "bar scene" for six weeks, starting at 9 a.m. and finishing at 10:30 p.m. each day, with Turkel recollecting that his clothes would be soaked in his own sweat by the end of every day's shoot. He also added that it was his favorite scene in the film.