Add new field in system.xml with <source_model>
<field id="productsku" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Select Product</label>
<source_model>My\Mpanel\Model\Config\Source\ProductSku</source_model>
</field>
Add ProductSku.php
at
app/code/My/Mpanel/Model/Config/Source
<?php
namespace My\Mpanel\Model\Config\Source;
class ProductSku implements \Magento\Framework\Option\ArrayInterface
{
protected $_productCollectionFactory;
public function __construct(
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
) {
$this->_productCollectionFactory = $productCollectionFactory;
}
public function toOptionArray()
{
$collection = $this->_productCollectionFactory->create();
$sku = [];
foreach ($collection as $product) {
$sku[] = ['value' => $product->getId(), 'label' => $product->getSku()];
}
return $sku;
}
}
OUTPUT:
Refer This Answer To Get Config Value: https://magento.stackexchange.com/a/108817/35758