I also don't see this in your codes/ Make sure it's added to the jscript_main.php

Code:
<?php
if (isset($_GET['products_id'])) { // use products_image if products_id exists
$pinterest_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
$pt_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $pinterest_image->fields['products_image'];
}
?>