。
She taught the child never to play with matches.
Literal
She [topic-は] that child [recipient-に] absolutely matches [with-で] not-do-mischief [in order to-ように] taught.
絶対に~ない ('absolutely never, under no circumstances') is a fixed pair-construction for emphatic prohibition. ~ように教える ('teach to do X / teach so that X') uses ように as the indirect-command marker — the same structure underlies ~ように言う ('tell someone to'). マッチでいたずらする ('play around / make mischief with matches') uses で in its means/instrument sense. Together it's a parental safety lesson — the kind of warning every Japanese parent (like every parent) drills into a small child.