Can sharding work with replication?
I'm not sure I understand your question. But yes, sharding and replication work together.

http://docs.mongodb.org/manual/faq/sharding/#how-does-sharding-work-with-replication

Anyway, the master-slave replication approach has been discouraged for some time. 

http://docs.mongodb.org/manual/core/master-slave/

The docs are pretty good, take a look at the replication section.