The Primera Liga side's debut in the competition became a story of missed opportunities as they faded after a dominant opening, allowing the Ukrainian veterans of the competition to snatch the points after the break.
Sociedad started the game brimming with confidence after eliminating Lyon to reach the group stages, despite suffering three consecutive Primera Liga matches without a win.
Meanwhile the visitors had made an unexpectedly sluggish start to the new Ukrainian Premier League season, also failing to win in three and travelling to Spain on the back of a 3-2 reverse at Karpaty on Friday.
The home side drove forward with purpose from the start and Shakhtar keeper Andriy Pyatov had to save well early to deny Antoine Griezmann and Xabi Prieto.
Pyatov was in action again to dive at the feet of Ruben Pardo, then Prieto fired just over the bar from a Pardo corner.
The 22-year-old Frenchman Griezmann was at the centre of most of the home side's moves and he came close again before Alberto di la Bella fired just over, and Carlos Vela saw his shot on the half-hour superbly blocked by Yaroslav Rakitskiy in the box.
Griezmann ended the first period by shooting just over and it always seemed likely the home side were going to be made to pay for their catalogue of missed chances.
Shakhtar duly obliged by going ahead in the 65th minute when Teixeira pounced to fire home a strong shot from a Douglas Costa flick in the box.
The home side refused to accept defeat and came close to snatching a deserved equaliser in the 74th minute when the lively Vela headed against the Shakhtar bar.
But the visitors defended well and ended any home hopes of a comeback when Teixeira wrapped things up in style three minutes from time, drifting in from the left flank and drilling a strong low shot past home keeper Claudio Bravo.