She appeared in a play for the first time.

Literal

She [topic-は] first-time play [in-に] appeared.

初めて (for the first time) modifies the entire event — this was her first theatrical appearance. 劇に出る (to appear in a play) uses 出る in its 'appear/come out' sense with に marking the event. 劇 is a general term for drama or a theatrical performance, covering everything from stage plays to dramatic productions.