Calling custom class from shortcode class

I’m developing a shortcode plugin much like the Shortcode UI plugin. Now I have code which is used in two shortcode handlers and in the shortcode plugin as well. So I want to place that code in a function in a new custom class possibly in a new PHP file in the same directory as the plugin.

The problem is that although I can call the function successfully from the plugin I’m having problems calling it from the shortcode handler function.

This is not a Grav specific problem I know but nevertheless I hope someone can help me out. Thank you!