It's not obviously ethically bad, but it's a poor way of going about things. You cite papers for a number of reasons:
- To place your own work in context (to show the way in which your work relates to that of others).
- To help your readers find other papers in the field.
- (Somewhat more tenuously) To demonstrate your own awareness of the broader field in which you work and thereby imply that there might be a slightly higher chance that you know the subject well enough to make your work interesting. (Of course, work done in isolation can also be interesting, so this doesn't entirely hold water.)
- (Sad, but not entirely uncommon) To avoid your paper being sent back by a reviewer who was saddened that his/her own paper wasn't cited.
In none of these cases does citing a paper in and of itself imply that you endorse the contents of that paper. (In the last case, people have been known to say mildly complimentary things, which do count as endorsing the paper to some extent, but the fact of citation itself doesn't.)
As a result, you should cite all papers that you feel are relevant, and explain your views on them in the text. If you think a paper's relevant but rubbish, you can always say things like:
In \cite{Foo}, Foo et al. described an early method for crawling Bars.
This work unfortunately had a number of significant downsides,
including its failure to maximise your whiskey intake per unit time.
More recent works \cite{Baz} have addressed this issue by focusing
exclusively on Whiskey Bars.
It's less helpful to say something like:
There was some work by Foo et al. that focused on generic Bars and
wasn't great. However, the exciting work by Baz and Wibble \cite{Baz},
which focuses exclusively on Whiskey Bars, has addressed this issue.
As a reader, I might still want to read the sub-optimal work of Foo et al. to better understand the limitations of their approach. By citing it, you help me do that.
More generally, judging the quality of a paper by the number of citations is an inaccurate business at best - you can write a bad paper and get all of your friends to cite it, and you can write a good paper that gets ignored. Number of citations tells you a little about the impact your paper has had (if only on your friends in some cases), but nothing about whether it's any good. A bad paper can have a greater impact than a good one.
rel="nofollow"
?