I've set up a custom attribute for each product called shipping_class.

How do I obtain this attribute from a custom shipping module?

In the quote function I need to get the shipping_class attribute and use this as well as the $shipping_weight to figure a shipping total.

Can anyone help?