How can I render my form?
Remove the '#' from the form field key and clear cache. $forms['theme'] instead of $forms['#theme'].

$forms['theme'] = [
    '#theme' =&gt; 'moduletheme',
    '#test_var' =&gt; $this-&gt;t('Test Value'),
];