Use this with {{ shop.products | type: 'custom', filter: 'my_store_featured_products' }}. Return product IDs that should be rendered by the variable.
Developer note:
Add custom PHP in a small custom plugin or child theme, and test it on a staging site before production. This example requires ongoing maintenance when extension APIs change.
functions.php
<?php
add_filter( 'my_store_featured_products', 'my_store_featured_product_ids' );
/**
* Supply product IDs to a custom shop.products filter.
*
* @param int[] $product_ids Existing product IDs.
* @return int[]
*/
function my_store_featured_product_ids( $product_ids ) {
$product_ids[] = 586;
$product_ids[] = 4033;
return array_values( array_unique( array_map( 'absint', $product_ids ) ) );
}