I am trying to save a product programatically. How can i save that product to a particular store group alone. I read in the magento intro, that a storegroup is a collection of products, But i couldn't find any parameter in product model, which restricts a product to a store group.
You cannot add products to store groups. You can only assign products to websites
Or set their visibility to a certain value in a store view.
$product->setStoreId(2)->load(15)->setVisibility(1)->save(); //visibility can be from 1 to 4.