Rudiger's Header For Real Madrid
Antonio Rudiger scored a brave header which saw blood all over his face deep in stoppage time to equalise and earn the reigning champions passage to the knock-out rounds.
Madrid join Manchester City as the only two clubs that have sealed their place in the round of 16.
The Ukrainian side, playing their home matches in Poland because of the Russian invasion of Ukraine, impressed and took the lead through Oleksandr Zubkov early in the second half.
It seemed like Madrid were poised to lose their first match of the season across all competitions, but Rudiger headed home from Toni Kroos's cross in the fifth minute of five added on, colliding with goalkeeper Anatoliy Trubin in the process.
Rudiger left the pitch covered in blood, and the Shakhtar goalkeeper had to see out the final seconds with a bandage wrapped around his head.
Carlo Ancelotti had rested Vinicius Junior, among others, keeping an eye on Sunday's Clasico against bitter rivals Barcelona at the Santiago Bernabeu.
However, Madrid talisman Benzema started the game after missing the 1-0 win over Getafe on Saturday and was the first to test Trubin with a blast straight at the goalkeeper.
The Ukrainian made several brilliant saves at the Santiago Bernabeu in a 2-1 defeat last week, but had a much quieter opening half on this occasion.
Trubin made another stop to deny Benzema from a tight angle, but had little else to do as Los Blancos rarely clicked in attack.
Shakhtar took a surprise lead at the start of the second half, with Lucas Vazquez failing to cut out Bogdan Mykhaylichenko's cross and Zubkov getting the jump on Mendy to head home.
Ancelotti responded by withdrawing Belgian playmaker Eden Hazard, who failed to make an impact in an attacking midfield role, and threw on Vinicius and Luka Modric.
Still, the Ukrainian side, filled with youth players after many senior squad members departed because of the war, were tireless.
Pouring forward, Zubkov played in Lassina Traore, who was first denied by Madrid goalkeeper Andriy Lunin, and then the crossbar, coming inches from the second goal.
Lunin was forced into another save by the electric Zubkov from distance and Ancelotti threw on more stars from the bench, with David Alaba, Eduardo Camavinga and Marco Asensio entering the fray.
It looked like Madrid's unbeaten streak was up, but Rudiger's bravery at the last meant they have not tasted defeat in 13 matches and will be in the last 16 of the Champions League, come February 2023.