You can set Magento store configuration values in code using the following snippet. The first parameter specifies the path in the core_config_data table.

Setting configuration values programmatically
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.