WRAP: Champions League
The Basques had enjoyed the better of the early exchanges in their first appearance in the competition for a decade and were unfortunate not to be awarded a penalty when Darijo Srna felled Xabi Prieto inside the area in the first half.
Shakhtar have reached the last 16 of the competition in two of the last three years, and their greater experience of this level shone through in the second period.
They counter-attacked to deadly effect and Teixeira twice fired home from the edge of the area.
Real Sociedad had only been beaten once at home since last November and impressed mightily in thumping Lyon 4-0 on aggregate to qualify via the play-offs last month.
And it was the hosts that started this Group A clash on the front foot as Antoine Griezmann had an early effort parried by Shakhtar keeper Andriy Pyatov before only an excellent saving challenge by Olexandr Kucher prevented Carlos Vela from opening the scoring.
The home fans and players were left furious at Romanian referee Ovidiu Hategan as he only awarded a free-kick outside the area when Srna brought down Prieto despite the offence clearly taking place within the box.
Pyatov made a smart stop to deny Haris Seferovic from a narrow angle as the second half started as the first ended.
However, the visitors began to look more dangerous on the break as the half developed and, after Taison rightly had a goal ruled out for offside, Teixeira put Shakhtar in front when his low drive from the edge of the area went straight through Claudio Bravo in the Real goal on 65 minutes.
Real responded positively to going behind as coach Jagoba Arrasate introduced last season's top-scorer Imanol Agirretxe from the bench.
And his side came within inches of an equaliser when Mikel Gonzalez saw his headed effort come off the crossbar on 77 minutes.
Shakhtar though were thriving on the counter as the hosts desperately pushed bodies forward in search of an equaliser, and Teixeira killed the game off three minutes from time when he cut inside and fired a magnificent effort into the bottom corner that left Bravo with no chance.