Step 1: Calculation of moles of NaOH.
Molar mass of NaOH $= 40\ \text{g mol}^{-1}$.
\[
\text{Moles of NaOH} = \frac{2.0}{40} = 0.05\ \text{mol}
\]
Step 2: Conversion of volume into dm$^3$.
\[
500\ \text{cm}^3 = 0.5\ \text{dm}^3
\]
Step 3: Calculation of molarity.
\[
\text{Molarity} = \frac{0.05}{0.5} = 0.1\ \text{mol dm}^{-3}
\]
Step 4: Conclusion.
Therefore, the molarity of the solution is $0.1\ \text{mol dm^{-3}$}.