Sheriff, from the unrecognised breakaway state of Transnistria, came through four rounds of qualifying to become the first Moldovan team to play in the group phase of Europe's elite club competition.
"A fantastic evening. My guys were not inferior to their opponent in speed or technique. Our tactics worked," said Sheriff's Ukrainian coach Yuriy Vernydub.
"We didn't allow Shakhtar to score, and the team performed excellently in moving from defence to attack. I should thank our fans for their fantastic support. I am happy."
Their shock victory over a Shakhtar side competing in the group stage for a fifth successive season left Sheriff top of Group D ahead of Real Madrid, who defeated Inter Milan 1-0 on Wednesday.