Adding a line item to an order from a module
You need to add the line item to the order itself. You can do this pretty easily with the entity wrapper:

$order_wrapper = entity_metadata_wrapper('commerce_order', $order);
$order_wrapper-&gt;commerce_line_items[] = $line_item;
$order_wrapper-&gt;save();