Why Arabic breaks in Photoshop
Arabic needs two things not every program does: joining the letters (each letter has up to four shapes depending on its place in the word) and right-to-left order. Programs without them show every letter on its own and flip the word.
What the tool does
It swaps each letter for its correct joined shape (initial, medial, final or isolated), writes "لا" as one character, then reverses each line so it reads right in a left-to-right program. Numbers and English words keep their order.
The lasting fix in Photoshop
In recent Photoshop versions, go to Preferences, Type and choose World-Ready Layout (or Middle Eastern and South Asian), then create a new text box. Photoshop then handles Arabic itself.
Frequently asked questions
The text is joined but backwards. What now?
Pick "Broken only" if the program orders the words right to left but doesn't join the letters, or "Broken and reversed" if it flips the order too.
Which font should I use?
One that supports Arabic, such as Tahoma, Arial, Noto Naskh Arabic or any Arabic font.