i am writing a function to display the shipping details on the product page, but cant "get_post

This isnt a support question but just wondering if anyone can check my syntax

function show_shipping() {
global $mp;
$settings = get_option('mp_settings');
//product weight
$shipping_meta = get_post_meta($product_id, 'mp_shipping', true);
$item_weight = $shipping_meta['shipping_weight'];
echo "weight is $item_weight  ";

The function carries on after this
I just cant return or echo the $shippingweight.
Is my syntax ok?
The weight comes from an added shipping meta box on the product form.