How do I force Twig output from my custom module, instead of from the theme? I'm new to Drupal, I create a module including block and twig.
I want to call out my twig(modules/custom/footer_block/src/templates) and store data in there when execute build() in block.

However, it output a twig from theme folder(a templates folder inside the theme folder) that's is not created by me. 

How can I force to output from my module folder?

The block is using the following code.

footerMenu_block.php.

public function build(){
    return [
        '#theme' =&gt; 'footer_menu',
        '#address_title' =&gt; $this-&gt;configuration['address_title'],
        '#address_content' =&gt; $this-&gt;configuration['address_content'],
    ];


footer-menu.twig.html

&lt;div&gt;
       &lt;h2&gt;{{ address_title }}&lt;/h2&gt;
       &lt;p&gt;{{ address_content }}&lt;/p&gt;
 &lt;/div&gt;


footer_block.module

&lt;?php
function footer_block_theme($existing, $type, $theme, $path){
  return array(
    'footer_menu' =&gt;
      array(
        'variables' =&gt; array(
          'address_title' =&gt; '',
          'address_content' =&gt; '',
        ),
      ),
  );
}


If I move the Twig to that output folder (inside theme folder), it will be unable to store my data.
If I make simple output '#markup' inside build() that will work fine. Therefore, other code in block should be working without problem.

I am using Drupal 8.6.x.
Try adding the template array key to your theme hook:

function footer_block_theme($existing, $type, $theme, $path){
  return [
    'footer_menu' =&gt; [
      'variables' =&gt; [
        'address_title' =&gt; '',
        'address_content' =&gt; '',
      ],
      'template' =&gt; 'footer-menu',
    ],
  ];
}


Or try adding the block twig template suggestion as:

function footer_block_theme($existing, $type, $theme, $path){
  return [
    'footer_menu' =&gt; [
      'template' =&gt; 'footer-menu',
      'base hook' =&gt; 'block',
    ],
  ];
}