I think that you need to parenthesize the top OR condition:
IF(@Filter='All')
SELECT @SearchSQL ='INSERT INTO #TempItems (ProductID) select p.ProductID from dnn_Smith_Products p
WHERE ( p.TabModuleId = ' + CAST ( @tabModuleId AS VARCHAR(10)) + ' OR p.Share = 1 ) AND (p.modelName LIKE ''%'+ @searchText+'%'' or p.description like ''%'+ @searchText+'%''')
ELSE
SELECT @SearchSQL ='INSERT INTO #TempItems (ProductID) SELECT p.ProductID from dnn_Smith_Products p inner join '+
' dnn_Smith_CategoryProduct c ON '+
' c.ProductID=p.ProductID WHERE ( p.TabModuleId = ' + CAST ( @tabModuleId AS VARCHAR(10)) + ' OR p.Share = 1 ) AND c.CategoryID='''+@Filter+''' and (p.modelName like ''%'+ @searchText+'%'' or p.description like ''%'+ @searchText+'%'')'