title: How to Create Product Using Custom Module?
body: <p>I want to create a product at the time of my custom module installation.how can i achieve that ?
  this is my custom module setup script</p>
  
  <pre><code>$this-&gt;startSetup();
  $product= new Mage_Catalog_Model_Product();
  $product-&gt;setSku("basic-plan");
  $product-&gt;setName("Basic Plan");
  $product-&gt;setDescription("Description for the product");
  $product-&gt;setShortDescription("Short Description for the product");
  $product-&gt;setPrice(20);
  $product-&gt;setTypeId('simple');
  $product-&gt;setAttributeSetId(4); // enter the catalog attribute set id here
  $product-&gt;setCategoryIds(array(16)); // id of categories
  $product-&gt;setWeight(1.0);
  $product-&gt;setTaxClassId(0); // taxable goods
  $product-&gt;setVisibility(1); // catalog, search
  $product-&gt;setStatus(1); // enabled
  $product-&gt;setStoreIDs(array(1));
  $product-&gt;setStockData(
      array(
          'is_in_stock' =&gt; 1,
          'qty' =&gt; 1000,
      'manage_stock' =&gt; 1
      )
  );
  $product-&gt;setIsRecurring('1');
  $product-&gt;setRecurringProfile(array(
          'schedule_description' =&gt; 'Basic Plan',
          'period_unit' =&gt; 'week',
          'period_frequency' =&gt; 1
  
      ));
  // assign product to the default website
  //$product-&gt;setWebsiteIds(array(Mage::app()-&gt;getStore(true)-&gt;getWebsite()-&gt;getId()));
  $product-&gt;setWebsiteIds(array(1));
  
  $product-&gt;save();
  
  /*Subscription Plan Products Ends Here*/
  
  
  $this-&gt;endSetup();
  </code></pre>
  
  <p>setup is running but i am not able to create product using this script</p>