The Ukrainian giants, who led 2-1 from the first leg, began brightly as they enjoyed the lion's share of possession in the early stages and earned several corners in quick succession.
Neither side could find the breakthrough by half time, but the Giallorossi went on to take the lead not long after the restart when Dzeko sprung the offside trap to latch on to a Kevin Strootman through-ball.
Pyatov mistimed his rush off the line, leaving the former Manchester City marksman to get beyond the Shakhtar keeper and calmly prod the ball into an empty net to put Roma in pole position for progress.
Moments later, a fracas broke out on the pitch after two Shakhtar players pushed a ballboy over the advertising boards for holding on to the ball in a chaotic finish to the match.
Roma were subsequently able to see the game out for an aggregate score of 2-2, which saw them through to the quarter-finals thanks to Under's away goal in the first leg.
ROMA (4-3-3): Alisson; Florenzi, Manolas, Fazio, Kolarov; Nainggolan, De Rossi, Strootman; Under (Gerson 65'), Dzeko (El Shaarawy 89'), Perotti
SHAKHTAR DONETSK (4-2-3-1): Pyatov; Butko, Ordets, Rakitsky, Ismaily; Fred, Stepanenko (Patrick 73'); Marlos (Dentinho 82'), Taison, Bernard; Ferreyra