No OC version provided. Forum rules. However, you could simply disable the guest checkout from the admin - > systems - > settings - > edit settings page.
The most generated errors being found on Opencart forum originates from contributed programming.
If you want them to go to Registration page whenever they visit your site (any other page), then you need to create a custom modification. There's no such functionality in OpenCart by default.