If the template you are trying to retrieve the store-config from already has a block associated with it that has scopeConfig injected then you can call the function from the block directly in your template, if not, you will need to create a block that has a function that can interact with scopeConfig like below.
You can programmatically retrieve store config by creating a helper function like so in your module .
class Data extends AbstractHelper
public function getConfig($config_path)
and inject where you need it if already not injected.
use Vendor\Module\Helper\Data as Helper;
public function __construct(Helper $helper)
$this->_helper = $helper;
public function getEmailAddress()
return $emailAddress = $this->_helper->getConfig('general/contact/email');
To find the format of the configuration data you need to retrieve, go to the core module, for which the data needed is, and look in
vendor/magento/module-<name>/etc/adminhtml/system.xml the format will be
section/group/field so you are looking for
<group id="<group_name>..., and
<field id="<field_name..., just grab the id’s and put them in order as the getConfig param i.e.
I wrote a blog entry here to retrieve store config in your module.