No. Electromagnets can attract only magnetic substances. As plastic is a non magnetic substance, it will not be attracted to electromagnet.
However, if the garbage contains only magnetic particles and plastic, we can easily take out the magnetic substance and only plastic will be left then.