There really is no “standard” way to do this. This is a very delicate situation, I think that the first rule will not be rude or excessive for your users.
Leave the sharing option always available in any menu and do not force it to use it.
In the rating, you can calculate the number of times your application will be used (or for a long time) and, based on this rating, displays a thing to give the user the opportunity to rate it, but if the user does not click "Remind me later" "never show this message again.
change
based on author’s comment: nothing special code to evaluate the application that you only run Action_VIEW for your link to the application (for example, for my application)
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.budius.WiFiShoot")));
and for the shared resource - the same standard sharing code ( http://developer.android.com/training/sharing/send.html ), just passing a link to your application and, possibly, an additional message like: check out my wonderful application! "
source share