How to programmatically create a product display(node) with reference to the product?
Try this function in a custom module 

function commerce_display_product_create_method($product){
    $node = new stdClass();
    $node-&gt;type = 'product_display';
    node_object_prepare($node);

    $node-&gt;title    = $product-&gt;title;
    $node-&gt;language = LANGUAGE_NONE;

    $node-&gt;field_product['und'][0]['product_id'] = $product-&gt;product_id;
    node_save($node);
}