How to use commerce_shipping hooks
It looks like you are using commerce shipping 2.x which differs a lot from 1.x in terms of integration.

What you need to do is:


Define a shipping method, use hook_commerce_shipping_method_info.
Define one or more shipping services use hook_commerce_shipping_service_info
When you define the shipping services, you can select a rate callback, if none is selected, commerce shipping will by default try to use SERVICE_NAME_rate, where SERVICE_NAME is the keyed name used in the hook_commerce_shipping_service_info hook. The rate callback have this signature:

function service_name_rate($shipping_service, $order) {
  // Logic here.
  return array(
    'amount' =&gt; $amount,
    'currency_code' =&gt; $currency_code,
    'data' =&gt; array(),
  );
}



You can look at the example module within the commerce shipping module which serves as documentation, or you can look at some of the other shipping methods, like UPS.