What did she buy at that shop?

Literal

She [topic-は] that shop [at-で] what [object-を] bought [question-か]?

A textbook polite question with the question particle か. で marks the location of the action — the shop is where the buying happened, hence で and not に. The polite past 買いました uses ~ました (past of ~ます), the standard register for talking to strangers, acquaintances, or in any context calling for everyday politeness. Question-word + を (何を) keeps the basic transitive frame: she bought *what* there.