Consider $R$ as $R$-module, then this is free, with basis $\lbrace 1 \rbrace $.
Suppose $I \subseteq R $ is an ideal, $I \neq 0 $; then $I$ is a submodule, whence it is free. If $u, v \in I $ they are linearly dependent over $R$, because $vu -uv = 0 $.
This implies that if $B= \lbrace u_1, u_2, \ldots \rbrace $ is a basis for $I$ as $R$-module, then $|B| = 1 $, so $I = < w > $ and I is a principal ideal.
For the domain part, if $a \in R $ , $a \neq 0 $, suppose $ba = 0 $ with $b \neq 0 $. Then consider $I = <a> $. By the previous part $I$ has a basis $\lbrace w \rbrace $. We have $w = k a $ for $ k \in R $. Then $$ bw = bka = k (ba) = 0$$ But $w $ is linearly independent and $b \neq 0 $. This is a contradiction and so $ba \neq 0 $.