How to put links in a menu programmatically?
Your question is relatively vague, but to answer the title, here's the code you need to use:

$link = array(
  'link_title' =&gt; t('Your link'),
  'link_path' =&gt; 'your-path',
  // Enter the name of the menu where you want this link to appear.
  'menu_name' =&gt; 'main-menu',
  'weight' =&gt; 0,
);
menu_link_save($link);